R4.2.1安装clusterProfiler
为什么要安装clusterProfiler
在做转录组分析,做到基因富集分析这一步,现在很多文章都是用的Y叔的clusterProfiler包来完成,于是开始安装。
安装及报错解决
安装
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("clusterProfiler")
报错
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23)
Old packages: 'Matrix', 'openssl'
显示'Matrix', 'openssl'这两个包需要更新
于是就安装这两个包
显示:
有二进制版本的,但源代码版本是后来的:
binary source needs_compilation
Matrix 1.5-0 1.5-1 TRUE
openssl 2.0.2 2.0.3 TRUE
Do you want to install from sources the packages which need compilation? (Yes/no/cancel) yes
安装源码包‘Matrix’, ‘openssl’
又报错
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
.........
ERROR: configuration failed for package ‘openssl’
查找解决方案心路历程
报错就是显示没有安装好Matrix和openssl这两个包
所以就各种search,R语言怎么安装openssl、mac怎么安装openssl,也尝试了各种方法,还是没有解决
去博客设置页面,选择一款你喜欢的代码片高亮样式,下面展示同样高亮
最后就突然搜到了帖子ERROR: compilation failed for package ‘Hmisc’,然后就尝试用binary方式安装
解决方法
install.packages("Matrix", type = "binary")
install.packages("openssl", type = "binary")
然后就安装好了Matrix和openssl这两个包
进一步安装好了clusterProfiler