我正在尝试在stringi
中安装R
包,但安装永远不会完成。下载和编译后,我收到以下消息:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/marcus/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so':
/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/marcus/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/marcus/R/x86_64-redhat-linux-gnu-library/3.3/stringi’
The downloaded source packages are in
‘/tmp/RtmpT5KQVP/downloaded_packages’
Warning message:
In install.packages("stringi") :
installation of package ‘stringi’ had non-zero exit status
我搜索了互联网,我无法理解这个错误信息的含义。如果有帮助,这是我的sessionInfo()
:
R version 3.3.1 (2016-06-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.3.1
答案 0 :(得分:2)
我解决了安装gcc 4.9.2
的问题。为此,我跑了
$ sudo yum install devtoolset-3-gcc-c++
$ sudo yum install devtoolset-3-gcc-gfortran
$ scl enable devtoolset-3 bash
在shell中。前两个命令会安装gcc
和gfortran
。最后一个使gcc 4.9.2
成为系统中的标准编译器。之后,我打开R
并运行install.packages("stringi")
以解决我的问题。