stringi包不会安装在CentOS中

时间:2016-12-05 01:38:11

标签: r stringi

我正在尝试在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

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中

。前两个命令会安装gccgfortran。最后一个使gcc 4.9.2成为系统中的标准编译器。之后,我打开R并运行install.packages("stringi")以解决我的问题。