安装R包-infercnv和LAPACK系统库

探序基因肿瘤研究院 整理

本作者系统为centos

1. 安装JAGS

下载JAGS-4.3.0.tar.gz,

./configure

出现报错:

checking if sgemm_ is being linked in already... no

checking for ATL_xerbla in -latlas... no

checking for sgemm_ in -lblas... no

checking for sgemm_ in -lmkl... no

checking for sgemm_ in -framework vecLib... no

checking for sgemm_ in -lcxml... no

checking for sgemm_ in -ldxml... no

checking for sgemm_ in -lscs... no

checking for sgemm_ in -lcomplib.sgimath... no

checking for sgemm_ in -lblas... (cached) no

checking for sgemm_ in -lblas... (cached) no

configure: error: "You need to install the LAPACK library"

于是下载:https://www.netlib.org/lapack

安装lapack,BLAS库等方法参照:https://blog.csdn.net/weixin_41277663/article/details/131379753

将libxxx.a文件等都复制到自己的文件夹下。把这个目录配置到环境变量中,./configure仍就configure: error: "You need to install the LAPACK library",./configure --with-blas=/xxx --with-lapack=/xxx 指定了目录,仍旧报错。将librefblas.a修改成:libblas.a才可以。

如果遇到报错:relocation R_X86_64_32 against `.rodata' can not be used when making a shared object,那么要以./configure --with-blas=/xxx --with-lapack=/xxx这种形式指定LAPACK库地址,编译时会增加-fPIC参数。

或者简单的解决方案:

在系统/usr/lib64目录中,发现:libblas.so.3.8.0,liblapack.so.3.8.0等。于是增加一个软连接,ln -s libblas.so.3.8.0 libblas.a,ln -s liblapack.so.3.8.0 liblapack.a

再./configure --with-blas=/usr/lib64 --with-lapack=/usr/lib64,make,make install,成功


2. 安装R包,rjags

Sys.setenv(LD_LIBRARY_PATH="/usr/local/lib64/JAGS/modules-4/")

Sys.setenv(LD_RUN_PATH="/usr/local/lib64/JAGS/modules-4/")

Sys.setenv(PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig")install.packages("rjags",configure.args="--enable-rpath")

参考:简书-CentOS7和Rstudio server安装LAPACK library、JAGS、rjags 和 inferCNV

rjags包的源代码:

https://cran.ms.unimelb.edu.au/web/packages/rjags/index.html


3. 安装R包infercnv

if(!require("BiocManager",quietly=TRUE))

    install.packages("BiocManager")

BiocManager::install("infercnv")

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容