8

I need to install different packages on R. The OS is ubuntu for windows. When I try "BiocManager::install("Biobase") I get the following error:

** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
mv: cannot move '/home/mark/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-Biobase/00new/Biobase' to '/home/mark/R/x86_64-pc-linux-gnu-library/3.6/Biobase': Permission denied
ERROR:   moving to final location failed

There seems to be something wrong with the permission to move certain files.. I already tried giving permission to write for everyone into the /3.6 directory, This didn't change anything.

Any solutions?

zx8754
  • 52,746
  • 12
  • 114
  • 209
Mark Wekking
  • 391
  • 1
  • 5
  • 14

1 Answers1

16

Apparently, this is a new feature in 3.6. But this should solve your problem:

Sys.setenv(R_INSTALL_STAGED = FALSE)

jake
  • 176
  • 1
  • 2
  • 3
    Thanks jake! Can someone comment on why this new feature was introduced? – Federico Giorgi Jan 17 '20 at 02:00
  • 1
    @FedericoGiorgi See this post on the blog https://developer.r-project.org/Blog/public/2019/02/14/staged-install/: "Staged installation is a new feature of R CMD INSTALL in R-devel, which is intended to be soon turned on by default. It isolates packages during installation time so that they are not accidentally accessed by other R sessions, which is key to correct function of parallel installation, but is relevant to any installation that may use multiple R sessions." – llrs Apr 28 '20 at 17:02