ELHL
ELHL

Reputation: 137

ERROR: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found on Centos Linux 7.7 while installing R devtools

I have a VM running with Centos Linux 7.7.1908. Now I ant to install devtools in R with:

> install.packages("devtools")

However, I get the following error:

/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/owner/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-xml2/00new/xml2/libs/xml2.so)

When doing: strings /usr/lib64/libstdc++.so.6 | grep GLIBC it does not show GLIBCXX_3.4.20 (as expected according to the error). The anaconda version in contrast shows

$ strings /home/owner/anaconda3/lib/libstdc++.so.6 | grep GLIBCXX
[...]
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
[...]

My idea was now to force R to use the anaconda version instead of libstdc++ in lib64. I tried to add to PATH (it was already there) and LD_LIBRARY_PATH, but no success here.

Thanks for help in advance!

Upvotes: 1

Views: 7445

Answers (1)

Employed Russian
Employed Russian

Reputation: 213456

I tried to add to PATH (it was already there) and LD_LIBRARY_PATH, but no success here.

PATH has absolutely not effect on where the dynamic loader looks for libraries, but LD_LIBRARY_PATH does, and should have worked.

If it didn't really work, it's likely because some intermediate shell script unsets that environment variable, or prepends /usr/lib64 to it. You'll need to find that script, and fix it.

Upvotes: 1

Related Questions