I can’t install the stringi package on Centos

Asked

Viewed 138 times

5

I’m trying to install the package stringi in a cluster that rotates Centos 7, but I am failing miseravelvente. The error that occurs is below:

** testing if installed package can be loaded
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/RtmpHKpp7q/downloaded_packages’
Warning message:
In install.packages("stringi") :
  installation of package ‘stringi’ had non-zero exit status

I already asked this question in the original OS and got a comment on it, but my ignorance on Linux did not allow me to understand what I need to do. I know it has something to do with libstdc++.so.6, but I can go no further than this.

The details of the R where I tried to install the package are below.

> 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
  • Have you tried anything like this? http://stackoverflow.com/q/16620942/3297472

  • I just tried. It didn’t work. I keep getting the same error message I put to the above question, even though I ran sudo yum install libstdc++*.

  • I think this can solve: http://stackoverflow.com/a/20357035/3297472

  • No. Nothing worked out. I even installed all the packages with gcc that exist in yum, set the path of the Libraries as in this link and yet, I keep getting the same error. The funny thing is that I don’t have this problem on Ubuntu or macOS (even installing the source version of the package). Only Centos who won’t cooperate with me.

1 answer

3


I discovered the problem. When rotating

strings /usr/lib64/libstdc++.so.6 | grep CXXABI

receive the output

CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1

I mean, I don’t have the CXXABI_1.3.8 installed in the cluster. When I went to investigate the reason for this, I discovered that it could be my version of gcc that was out of date. I went to check which version I had and bingo:

$ gcc -v
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)

Now it was just a matter of installing the gcc 4.9.x. To do this in Centos, just rotate

$ sudo yum install devtoolset-3-gcc-c++
$ sudo yum install devtoolset-3-gcc-gfortran
$ scl enable devtoolset-3 bash

The first two commands install the C, C++ and Fortran compilers. The third one tells the operating system to use the gcc 4.9.x as standard compiler. So when I check which version of gcc is active in the cluster, I get the following:

$ gcc -v
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)

This done, just enter the R, execute install.packages("stringi") and install the package normally.

In short, my problem was the version of gcc installed in the machine. As far as I have ascertained, the stringi requires it to be version 4.9.x. The older version 4.8.x did not work, just as 5.3.0 did not work either.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.