سؤال

So I've been trying to install an R package called igraph. At the end when it tries to load the package, I get the following error:

/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /tools/R/2.15.2/lib64/R/library/igraph/libs/igraph.so)

To me this error means that there's the wrong version of libstdc++.so.6. I, however am not using that file. A quick look to my LD_LIBRARY_PATH:

 echo $LD_LIBRARY_PATH 
/tools/gcc/4.7.0/lib64

In that directory there is a file named libstdc++.so.6 and the following shows that GLIBCXX_3.4.15 is actually there:

strings /tools/gcc/4.7.0/lib64/libstdc++.so.6 | grep GLIB
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

I don't understand why R is being stubborn and not using the file under the gcc directory and keeps trying to reference the /user/lib64 directory. Does anyone any have ideas?

هل كانت مفيدة؟

المحلول

Turns out there's a file under: $RHOME/etc/ called ldpaths that clears the LD_LIBRARY_PATH environment variable for some reason. I reset the LD_LIBRARY_PATH to my preferred paths in that file, relaunched R, and the package installed quite smoothly.

On a side-node: I think this is ridiculous behaviour for such a mature piece of software.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top