Closed mabuimo closed 7 months ago
R uses the value of the TAR
environment variable when attempting to figure out what tar
executable should be used. It looks like you have TAR
set to a location that doesn't exist, so renv
is detecting that and recovering.
That said, I don't know how your machine got into this state, since:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
$ which -a tar
/usr/bin/tar
/bin/tar
You could try manually reinstalling tar
, e.g. sudo apt install tar
.
Hi, thanks for your answer.
$ cat /etc/os-release
provides the same output you shared.
Reinstalling tar
didn't help:
# apt reinstall tar
# which -a tar
/bin/tar
I eliminated the above-mentioned warning creating a symlink:
# ln -s /bin/tar /usr/bin/tar
# which -a tar
/usr/bin/tar
/bin/tar
Strange, it looks like you're right... but I've always seen a tar
installation at /usr/bin/tar
, even though it's not provided by any apt
package. Even a plain Ubuntu 20.04 Docker image has /usr/bin/tar
available.
Either way, your solution should be fine, but the alternative would be to find where the TAR
environment variable is being set and update that. Usually that's set here:
$ cat $(R RHOME)/etc/Renviron | grep tar
## used by untar(support_old_tars = TRUE) and installing grDevices
## Prefer a tar that can automagically read compressed archives
TAR=${TAR-'/bin/tar'}
so it might be worth checking whether your R installation is referring to /usr/bin/tar
instead of /bin/tar
.
cat $(R RHOME)/etc/Renviron | grep tar
## used by untar(support_old_tars = TRUE) and installing grDevices
## Prefer a tar that can automagically read compressed archives
TAR=${TAR-'/usr/bin/tar'}
it seems R refers to /usr/bin/tar
as you indicated. What could be the cause?
How was R installed?
Hi, I followed these installation steps:
apt-get update
apt-get install gdebi-core
export R_VERSION=4.3.2
curl -O https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION}_1_amd64.deb
gdebi r-${R_VERSION}_1_amd64.deb
Thank you.
Thanks! I think this is an issue with the binary builds of R being distributed by Posit then -- it should prefer using /bin/tar
instead of /usr/bin/tar
here. I'll forward this issue on in the appropriate channels.
In the meantime, I think we've found a workaround for your case (use a symlink in /usr/bin
) and I think that will be sufficient.
Hi, I have noticed that when I load any project which uses renv 1.03 under Ubuntu 20.04 LTS and using R 4.3.2 I get this warning:
I don't get this message if I use R 4.2.2, Ubuntu 20.04 LTS, and renv 1.03.