install packages('Seuat')报了许多错,提到了include文件夹,make:[…] error1,openssl.so,dependency '' is not available for package ‘'
具体错误如下(省略了同类错误):
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:63:16: error: expected constructor, destructor, or type conversion before '(' token
63 | __MATHCALL_VEC (cos,, (Mdouble __x));
……
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:16: error: expected constructor, destructor, or type conversion before '(' token
153 | __MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y));
| ^
/home/anaconda3/envs/R4.2.2/x86_64-conda-linux-gnu/include/c++/12.2.0/cmath:180:11: error: 'cos' has not been declared in '::'
180 | using ::cos;
| ^~~
……
/home/anaconda3/envs/R4.2.2/x86_64-conda-linux-gnu/include/c++/12.2.0/cmath:421:11: error: 'sin' has not been declared in '::'
421 | using ::sin;
……
make: *** [/home/anaconda3/envs/R4.2.2/lib/R/etc/Makeconf:178: stri_brkiter.o] Error 1
ERROR: compilation failed for package ‘stringi’
……
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/anaconda3/envs/R4.2.2/lib/R/library/00LOCK-openssl/00new/openssl/libs/openssl.so':
/home/anaconda3/envs/R4.2.2/lib/R/library/00LOCK-openssl/00new/openssl/libs/openssl.so: undefined symbol: FIPS_mode
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/anaconda3/envs/R4.2.2/lib/R/library/openssl’
ERROR: failed to lock directory ‘/home /anaconda3/envs/R4.2.2/lib/R/library’ for modifying
……
* DONE (miniUI)
ERROR: dependency ‘stringr’ is not available for package ‘rmarkdown’
* removing ‘/home/anaconda3/envs/R4.2.2/lib/R/library/rmarkdown’
ERROR: dependency ‘stringr’ is not available for package ‘tidyr’
* removing ‘/home/anaconda3/envs/R4.2.2/lib/R/library/tidyr’
ERROR: dependency ‘stringr’ is not available for package ‘reshape2’
* removing ‘/home/anaconda3/envs/R4.2.2/lib/R/library/reshape2’
ERROR: dependency ‘rmarkdown’ is not available for package ‘htmlwidgets’
* removing ‘/home/anaconda3/envs/R4.2.2/lib/R/library/htmlwidgets’
ERROR: depend
该回答引用GPTᴼᴾᴱᴺᴬᴵ
这些错误看起来是R包安装时的编译错误。可能是由于您的系统缺少某些依赖项,或者某些依赖项版本不兼容而导致的。
您可以尝试在conda虚拟环境中安装缺失的依赖项,例如libssl-dev:
conda install libssl-dev
如果这个命令不能解决问题,您可以尝试升级R及其所有包:
conda update r-base
conda update --all
如果问题仍然存在,请尝试在终端中手动安装有问题的包,例如:
conda install -c conda-forge r-openssl
如果仍然无法解决问题,建议将错误信息反馈给R包的开发者或者提问R社区,以获得更多的帮助。
不知道你这个问题是否已经解决, 如果还没有解决的话:seuat是什么包,seurat吧
install.packages('Seurat')
#如果要下老版本
remotes::install_version("Seurat", version = "3.X.X")