I use Posit on AWS sagemaker. I am trying to install the Seurat package for scRNA analysis. I tried to install the package using
remotes::install_github("satijalab/seurat","v5.0.1")
I am getting this error
remotes::install_github("satijalab/seurat","v5.0.1")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo satijalab/seurat@v5.0.1
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: matrixStats (1.1.0 -> 1.2.0) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
matrixStats (1.1.0 -> 1.2.0) [CRAN]
Installing 1 packages: matrixStats
Installing package into ‘/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/matrixStats_1.2.0.tar.gz'
Content type 'application/x-gzip' length 210870 bytes (205 KB)
==================================================
downloaded 205 KB
ERROR: failed to lock directory ‘/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2’ for modifying
Try removing ‘/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-matrixStats’
The downloaded source packages are in
‘/tmp/RtmpowPYMX/downloaded_packages’
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/tmp/RtmpowPYMX/remotesd5f58c3c74e/satijalab-seurat-6b89679/DESCRIPTION’ (344ms)
─ preparing ‘Seurat’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ installing the package to process help pages
─ cleaning src (1m 14.7s)
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘Seurat_5.0.1.tar.gz’
Installing package into ‘/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
ERROR: failed to lock directory ‘/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2’ for modifying
Try removing ‘/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-Seurat’
Warning messages:
1: In i.p(...) :
installation of package ‘matrixStats’ had non-zero exit status
2: In i.p(...) :
installation of package ‘/tmp/RtmpowPYMX/filed5fe5e7012/Seurat_5.0.1.tar.gz’ had non-zero exit status
I tried to remove the 00LOCK-Seurat as well in the terminal but getting another error
'' Device or resource busy"
please help.