linux学习100篇25: linux -R包安装--Seurat

R包安装比数据分析难多了

(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

你可能感兴趣的:(linux学习100篇25: linux -R包安装--Seurat)