DESeq2 install --- 如何安装R包("RcppArmadillo")?

2023-06-05,,

安装R包(“RcppArmadillo”)失败,导致依赖该包的DESeq2 无法使用;

首先对gcc,g++升级至4.7,

但依然报错,还是安装不了RcppArmadillo;

报错如下:

$ R

> source("https://bioconductor.org/biocLite.R")
> biocLite("DESeq2")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.2 (BiocInstaller 1.20.3), R 3.4.1 (2017-06-30).
Installing package(s) ‘DESeq2’
also installing the dependencies ‘RcppArmadillo’, ‘locfit’, ‘geneplotter’ trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/RcppArmadillo_0.7.960.1.1.tar.gz'
Content type 'application/octet-stream' length 1115539 bytes (1.1 MB)
==================================================
downloaded 1.1 MB trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/locfit_1.5-9.1.tar.gz'
Content type 'application/octet-stream' length 196560 bytes (191 KB)
==================================================
downloaded 191 KB trying URL 'https://bioconductor.org/packages/3.2/bioc/src/contrib/geneplotter_1.48.0.tar.gz'
Content type 'application/x-gzip' length 1400072 bytes (1.3 MB)
==================================================
downloaded 1.3 MB trying URL 'https://bioconductor.org/packages/3.2/bioc/src/contrib/DESeq2_1.10.1.tar.gz'
Content type 'application/x-gzip' length 1255971 bytes (1.2 MB)
==================================================
downloaded 1.2 MB * installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -m64 accepts -g... yes
checking how to run the C++ preprocessor... g++ -m64 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -m64 accepts -g... (cached) yes
checking whether g++ version is sufficient... no
configure: WARNING: Only g++ version 4.7.2 or greater can be used with RcppArmadillo.
configure: error: Please use a different compiler.
ERROR: configuration failed for package ‘RcppArmadillo’
* removing ‘/public/home/user/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo’
* installing *source* package ‘locfit’ ...
** package ‘locfit’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC -c S_enter.c -o S_enter.o
......
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -o locfit.so S_enter.o band.o dbinom.o dens_haz.o dens_int.o dens_odi.o density.o ev_atree.o ev_interp.o ev_kdtre.o ev_main.o ev_sphere.o ev_trian.o family.o fitted.o frend.o lf_adap.o lf_dercor.o lf_fitfun.o lf_nbhd.o lf_robust.o lf_vari.o lf_wdiag.o lfstr.o locfit.o m_chol.o m_eigen.o m_icirc.o m_imont.o m_isimp.o m_isphr.o m_jacob.o m_max.o m_qr.o m_solve.o m_svd.o m_vector.o math.o minmax.o pcomp.o preplot.o prob.o procv.o scb.o scb_cons.o scb_crit.o scb_iface.o simul.o smisc.o startlf.o weight.o -L/usr/lib64/R/lib -lR
installing to /public/home/user/R/x86_64-redhat-linux-gnu-library/3.4/locfit/libs
** R
** data
** preparing package for lazy loading
** help
*** installing help indices
.........
** building package indices
** testing if installed package can be loaded
* DONE (locfit)
* installing *source* package ‘geneplotter’ ...
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
......
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (geneplotter)
ERROR: dependency ‘RcppArmadillo’ is not available for package ‘DESeq2’
* removing ‘/public/home/user/R/x86_64-redhat-linux-gnu-library/3.4/DESeq2’ $ gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

解决方法:

## R version 3.4.1 (2017-06-30)
## Platform: x86_64-redhat-linux-gnu (64-bit)
## Running under: CentOS release 6.5 (Final)
#安装低版本的RcppArmadillo包
#Old sources---RcppArmadillo archive: https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/
install.packages("https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/RcppArmadillo_0.3.930.1.tar.gz", repos=NULL) source("https://bioconductor.org/biocLite.R")
biocLite("DESeq2")

MADE IT ^ _^

DESeq2 install --- 如何安装R包("RcppArmadillo")?的相关教程结束。

《DESeq2 install --- 如何安装R包("RcppArmadillo")?.doc》

下载本文的Word格式文档,以方便收藏与打印。