Skip to content

Avoid using /usr/bin/tar on Debian machines #198

@kevinushey

Description

@kevinushey

This is a follow-up from rstudio/renv#1794.

For the builds of R published on https://docs.posit.co/resources/install-r, it looks like R is configured to use system installations of tar and sed as so:

$ cat Renviron | grep 'SED\|TAR'
SED=${SED-'/usr/bin/sed'}
TAR=${TAR-'/usr/bin/tar'}

This can be problematic in rare scenarios, as /usr/bin/sed and /usr/bin/tar are not actually provided by any apt packages. So, if those programs are not available for some reason, it's not clear for the user on how to recover.

Some other similar instances:

$ cat Renviron | grep /usr/bin/
R_PRINTCMD=${R_PRINTCMD-'/usr/bin/lpr'}
R_TEXI2DVICMD=${R_TEXI2DVICMD-${TEXI2DVI-'/usr/bin/texi2dvi'}}
R_GZIPCMD=${R_GZIPCMD-'/usr/bin/gzip'}
R_UNZIPCMD=${R_UNZIPCMD-'/usr/bin/unzip'}
R_ZIPCMD=${R_ZIPCMD-'/usr/bin/zip'}
R_BZIPCMD=${R_BZIPCMD-'/usr/bin/bzip2'}
PAGER=${PAGER-'/usr/bin/pager'}
R_PDFVIEWER=${R_PDFVIEWER-'/usr/bin/xdg-open'}
SED=${SED-'/usr/bin/sed'}
TAR=${TAR-'/usr/bin/tar'}

In other words, for each of these programs, if a variant exists in /bin, I think that version should be preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions