r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
301 stars 125 forks source link

install SnapATAC permission fails #1

Closed miy059 closed 5 years ago

miy059 commented 5 years ago
Error: ERROR: no permission to install to directory ‘/opt/R/local/lib’
Installation failed: Command failed (1)
'/opt/R/lib64/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL '/tmp/RtmpxpKUju/devtools176f4e50941d/doSNOW'  \
  --library='/opt/R/local/lib' --install-tests 
r3fang commented 5 years ago

Hi Miao,

you need to install the package under your own R library. First, check the library path you have by

$ R
> .libPaths()
[1] "/opt/R/local/lib"
[2] "/home/r3fang/R/x86_64-pc-linux-gnu-library/3.4"
[3] "/opt/R/lib64/R/library"

In the above example, the primary path is "/opt/R/local/lib" which you do not have permission to install all the dependency, to install SnapATAC to you local library directory:

> library(devtools);
> with_libpaths(new = "/home/r3fang/R/x86_64-pc-linux-gnu-library/3.4", install_github('r3fang/SnapATAC'));