我通过键入以下命令成功安装了RcppArmadillo:
export PATH=/opt/local/bin:$PATH
export LD_LIBRARY_PATH=/opt/src/GCC/install/gcc-4.8.2/lib64:/usr/lib64:/usr/lib
wget https://cran.ma.imperial.ac.uk/src/contrib/Rcpp_0.12.18.tar.gz
wget https://cran.ma.imperial.ac.uk/src/contrib/RcppArmadillo_0.8.600.0.0.tar.gz
R CMD INSTALL Rcpp_0.12.18.tar.gz
R CMD INSTALL RcppArmadillo_0.8.600.0.0.tar.gz
但是,当我尝试加载RcppArmadillo时,出现以下错误:
Error: package or namespace load failed for ‘RcppArmadillo’ in
dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/ecg/ad603/R/x86_64-redhat-linux-gnu-
library/3.5/RcppArmadillo/libs/RcppArmadillo.so':
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by
/home/ecg/ad603/R/x86_64-redhat-linux-gnu-library/3.5/RcppArmadillo/libs/RcppArmadillo.so)
知道为什么会这样吗?