r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
331 stars 152 forks source link

install_version complains not finding gzip not found #656

Closed hermandr closed 2 years ago

hermandr commented 2 years ago

I encountered this error when installing a previous version of a package.

remotes::install_version("themis","0.1.1",repos = "http://cran.us.r-project.org")

Error log

The downloaded source packages are in
    ‘/tmp/Rtmpwec1Yu/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Downloading package from url: http://cran.us.r-project.org/src/contrib/Archive/themis/themis_0.1.1.tar.gz
sh: 1: sh: 1: /usr/bin/gzip: not found/bin/gtar: not found

sh: 1: /usr/bin/gzip: not found
sh: 1: /bin/gtar: not found
Error: Failed to install 'unknown package' from URL:
  error in running command
In addition: Warning messages:
1: In system(paste(TAR, "--version >", tf, "2>&1")) :
  error in running command
2: In system(cmd) : error in running command
3: In utils::untar(tarfile, ...) :
  ‘/usr/bin/gzip -dc '/tmp/Rtmpwec1Yu/file675f9074ad.tar.gz' | /bin/gtar -xf '-' -C '/tmp/Rtmpwec1Yu/remotes672a3c4ee5'’ returned error code 127
4: In system(paste(TAR, "--version >", tf, "2>&1")) :
  error in running command
Execution halted
jimhester commented 2 years ago

There is something wrong with the PATH on your system, or the setting of TAR environment variable. The gzip and tar binaries are not being found.

This sort of question is a better fit for https://community.rstudio.com. Do you mind asking it over there? (You might want to read https://www.tidyverse.org/help/ first to maximise your chances of getting a good answer)