[英]Path To libstdc++ while installing R package
So I've been trying to install an R package called igraph
. 所以我一直在尝试安装一个名为
igraph
的R包。 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
. 对我而言,此错误意味着存在错误版本的
libstdc++.so.6
。 I, however am not using that file. 我,但是没有使用该文件。 A quick look to my LD_LIBRARY_PATH:
快速浏览我的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: 在该目录中,有一个名为libstdc ++。so.6的文件,下面显示实际上存在GLIBCXX_3.4.15:
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. 我不明白为什么R会很顽固并且不使用gcc目录下的文件,而是一直尝试引用/ user / lib64目录。 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. 原来在
$RHOME/etc/
下有一个名为ldpaths
,由于某种原因该文件清除了LD_LIBRARY_PATH
环境变量。 I reset the LD_LIBRARY_PATH
to my preferred paths in that file, relaunched R, and the package installed quite smoothly. 我将
LD_LIBRARY_PATH
重置为该文件中的首选路径,重新启动了R,并且该软件包的安装非常顺利。
On a side-node: I think this is ridiculous behaviour for such a mature piece of software. 在一个副节点上:对于这样一个成熟的软件,我认为这是荒谬的行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.