There's not much of an error report, so I'm not sure what's going wrong. I do have internet connectivity, so that should not be the problem.
> devtools::install_github("tidyverse/dplyr")
Downloading GitHub repo tidyverse/dplyr@master
from URL https://api.github.com/repos/tidyverse/dplyr/zipball/master
Installation failed: error in running command
> devtools::install_github("r-lib/devtools")
Downloading GitHub repo r-lib/devtools@master
from URL https://api.github.com/repos/r-lib/devtools/zipball/master
Installation failed: error in running command
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /ebio/abt3_projects/software/miniconda3/envs/ga_R_install/lib/R/lib/libRblas.so
LAPACK: /ebio/abt3_projects/software/miniconda3/envs/ga_R_install/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.1
Is it possible R is not on your PATH?
I have been experiencing the same error, as have others:
The proposed solutions from these issues is to set options(unzip = "internal")
before installing from github:
library(devtools)
options(unzip = "internal")
devtools::install_github("tidyverse/dplyr")
or to run sudo apt-get install unzip
. However, this alone did not solve my problem.
After a little more digging, the problem arises from the fact that, in my case, the conda-provided R install (conda install -c r r-base
) sets TAR=/bin/gtar
within R (Sys.getenv["TAR"]
) which does not exist on a vanilla Ubuntu 16.04 install (it should be TAR=/bin/tar
according to https://github.com/r-lib/devtools/issues/379).
The following worked for me:
sudo apt-get install unzip
export TAR=/bin/tar
# run R code here
Instead of export TAR=/bin/tar
you could also create a symlink with sudo ln -s /bin/tar /bin/gtar
, but exporting the environmental variable is preferred.
So this (at least in your case) seems like a conda bug then, do you think you could open an issue at https://github.com/conda/conda/issues?
This same behavior is also mentioned at https://github.com/r-lib/devtools/issues/379#issuecomment-309836261
I ran into the same issue and it was indeed https://github.com/conda-forge/r-devtools-feedstock/issues/4 It would be nice for devtools
to give a better error message than just error in running command
.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
Most helpful comment
I have been experiencing the same error, as have others:
The proposed solutions from these issues is to set
options(unzip = "internal")
before installing from github:or to run
sudo apt-get install unzip
. However, this alone did not solve my problem.After a little more digging, the problem arises from the fact that, in my case, the conda-provided R install (
conda install -c r r-base
) setsTAR=/bin/gtar
within R (Sys.getenv["TAR"]
) which does not exist on a vanilla Ubuntu 16.04 install (it should beTAR=/bin/tar
according to https://github.com/r-lib/devtools/issues/379).The following worked for me:
Instead of
export TAR=/bin/tar
you could also create a symlink withsudo ln -s /bin/tar /bin/gtar
, but exporting the environmental variable is preferred.