For some reason when using stacked conda environment TAR is set to /bin/gtar which doesn't exist on any of the stat hosts, preventing certain packages from being installed – namely the wmfdata R package which is downloaded from GitHub.
$ which R && R -e "Sys.getenv('TAR'); R.version.string" /usr/bin/R ... > Sys.getenv('TAR'); R.version.string [1] "/bin/tar" [1] "R version 3.5.2 (2018-12-20)"
(Consequently no problems installing wmfdata-r there.)
$ source conda-activate-stacked Activating /home/bearloga/.conda/envs/2021-05-07T20.39.55_bearloga stacked on /usr/lib/anaconda-wmf... $ which R && R -e "Sys.getenv('TAR'); R.version.string" /usr/lib/anaconda-wmf/bin/R ... > Sys.getenv('TAR'); R.version.string [1] "/bin/gtar" [1] "R version 3.6.1 (2019-07-05)"
(Causes problems because there is no /bin/gtar)
Workaround:
install.packages("remotes") remotes::install_github("wikimedia/wmfdata-r")
succeeds outside of conda and fails within a conda environment:
Downloading GitHub repo wikimedia/wmfdata-r@HEAD sh: 1: /bin/gtar: not found sh: 1: /bin/gtar: not found Error: Failed to install 'wmfdata' from GitHub: error in running command
Temporary solution: Running Sys.setenv(TAR = "/usr/bin/tar") first allows {remotes} package to call the correct utility instead of the non-existent /bin/gtar.