linux學(xué)習(xí)100篇25: linux -R包安裝--Seurat

R包安裝比數(shù)據(jù)分析難多了

(base) root@BC-25-at-66-181:~# R

R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Seurat)
Error in library(Seurat) : there is no package called 'Seurat'
> install.packages("Seurat")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
also installing the dependencies 'RSpectra', 'uwot'

trying URL 'https://cloud.r-project.org/src/contrib/RSpectra_0.16-0.tar.gz'
Content type 'application/x-gzip' length 125821 bytes (122 KB)
==================================================
downloaded 122 KB

trying URL 'https://cloud.r-project.org/src/contrib/uwot_0.1.10.tar.gz'
Content type 'application/x-gzip' length 96150 bytes (93 KB)
==================================================
downloaded 93 KB

trying URL 'https://cloud.r-project.org/src/contrib/Seurat_4.0.2.tar.gz'
Content type 'application/x-gzip' length 1456048 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

ERROR: failed to lock directory '/usr/local/lib/R/site-library' for modifying
Try removing '/usr/local/lib/R/site-library/00LOCK-RSpectra'
ERROR: dependency 'RSpectra' is not available for package 'uwot'
* removing '/usr/local/lib/R/site-library/uwot'
ERROR: dependency 'uwot' is not available for package 'Seurat'
* removing '/usr/local/lib/R/site-library/Seurat'

The downloaded source packages are in
    '/tmp/RtmphMJsXH/downloaded_packages'
Warning messages:
1: In install.packages("Seurat") :
  installation of package 'RSpectra' had non-zero exit status
2: In install.packages("Seurat") :
  installation of package 'uwot' had non-zero exit status
3: In install.packages("Seurat") :
  installation of package 'Seurat' had non-zero exit status

那就首先去/usr/local/lib/R/site-library/00LOCK-RSpectra

把00LOCK-RSpectra刪掉
把RSpectra和uwot這兩個依賴包安裝上去 然后再裝Seurat就成功了


image.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容