remotes icon indicating copy to clipboard operation
remotes copied to clipboard

`System command 'R' failed` for any packages

Open Zepeng-Mu opened this issue 1 year ago • 2 comments

> remotes::install_github("stephenslab/mashr", build_vignettes = F)
Downloading GitHub repo stephenslab/mashr@HEAD
✔  checking for file ‘/tmp/Rtmp04xv01/remotes57651587d912/stephenslab-mashr-e482cf2/DESCRIPTION’ (362ms)
─  preparing ‘mashr’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
   Warning in file(file, "wb") :
     cannot open file 'mashr/cleanup': Text file busy
   Error in file(file, "wb") : cannot open the connection
   Execution halted
Error: Failed to install 'mashr' from GitHub:
  ! System command 'R' failed

I get this "System command 'R' failed" error message when using devtools::install_github() or remotes::install_github(). This is happening to all packages. I'm using a conda env.

> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Scientific Linux 7.4 (Nitrogen)

Matrix products: default
BLAS/LAPACK: /scratch/midway2/zepengmu/conda_envs/newbase/lib/libopenblasp-r0.3.18.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] processx_3.6.1    compiler_4.0.5    R6_2.5.1          rprojroot_2.0.3
 [5] cli_3.3.0         prettyunits_1.1.1 tools_4.0.5       withr_2.5.0
 [9] curl_4.3.2        crayon_1.5.1      remotes_2.4.2     callr_3.7.0
[13] ps_1.7.1          pkgbuild_1.3.1

Zepeng-Mu avatar Sep 02 '22 00:09 Zepeng-Mu

Try standalone mode, see https://github.com/r-lib/remotes#standalone-mode

Did you install R from conda? If not then deactivate conda while using R.

gaborcsardi avatar Sep 02 '22 00:09 gaborcsardi

Thanks for the quick reply. I actually also need set build=F. I'm not sure what it means. My R is installed with conda. It worked fine before, but I recently updated conda.

> Sys.setenv(R_REMOTES_STANDALONE="true")
> remotes::install_github("stephenslab/mashr")
Downloading GitHub repo stephenslab/mashr@HEAD
Running `R CMD build`...
* checking for file ‘/tmp/RtmpYeymKC/remotes7ade6369c45/stephenslab-mashr-e482cf2/DESCRIPTION’ ... OK
* preparing ‘mashr’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* checking for LF line-endings in source and make files and shell scripts
STDOUT:
* checking for file ‘/tmp/RtmpYeymKC/remotes7ade6369c45/stephenslab-mashr-e482cf2/DESCRIPTION’ ... OK
* preparing ‘mashr’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* checking for LF line-endings in source and make files and shell scripts
STDERR:
Warning in file(file, "wb") :
  cannot open file 'mashr/cleanup': Text file busy
Error in file(file, "wb") : cannot open the connection
Execution halted
Error: Failed to install 'mashr' from GitHub:
  Failed to `R CMD build` package, try `build = FALSE`.
> remotes::install_github("stephenslab/mashr", build=F)

Zepeng-Mu avatar Sep 02 '22 01:09 Zepeng-Mu

Unfortunately it is unlikely that we can help you with this, because we don't use conda.

gaborcsardi avatar Nov 01 '23 14:11 gaborcsardi