执行二进制文件:“GLIBCXX_3.4.11”未找到
我正在尝试运行一些预编译的代码,但出现以下错误:
./bin/stipdet: /cm/shared/apps/gcc/4.3.4/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./bin/stipdet)
我用 google 搜索了该错误,发现有些人通过删除 libstdc++.so.6
并添加指向 usr/local/lib 的新动态链接。但我在尝试运行此程序的系统上没有 root 访问权限,因此无法在该目录中添加/删除文件。
有谁知道解决这个问题的另一种方法?
更新:
我尝试将另一个版本的 libstdc++.so.6
的目录添加到 LD_PRELOAD
中,但它对我不起作用,它仍然使用错误目录中的文件。
当我将正确的目录添加到 LD_LIBRARY_PATH 之前时,也会发生同样的情况。最后,我还尝试从 LD_LIBRARY_PATH 中删除其他所有内容,然后添加正确的目录(只是为了尝试)。这似乎修复了原来的错误! 但现在我在不同的位置遇到相同的错误:
./bin/stipdet: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /var/scratch/user/local/lib/libopencv_features2d.so.2.2)
显然 opencv
使用不同的 glibcxx
版本,因此切换到另一个 libstdc
会中断<代码> opencv 。有什么办法可以解决这个问题吗?
I'm trying to run some pre-compiled code but I'm getting the following error:
./bin/stipdet: /cm/shared/apps/gcc/4.3.4/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./bin/stipdet)
I googled the error and saw that some people solved similar problems by deleting the libstdc++.so.6
and adding a new dynamic link pointing to usr/local/lib
. But I don't have root access on the system I'm trying to run this on, so I can't add/delete files in that directory.
Does anyone know another way to solve this problem?
UPDATE:
I tried adding the directory of another version of libstdc++.so.6
to the LD_PRELOAD
, but it didn't work for me, it still uses the file from the wrong directory.
The same happens when I prepend the correct directory to the LD_LIBRARY_PATH
. Finally, I also tried to remove everything else from the LD_LIBRARY_PATH
and then add the correct directory (just to try). This seemed to fix the original error!
But now I'm getting the same error at a different location:
./bin/stipdet: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /var/scratch/user/local/lib/libopencv_features2d.so.2.2)
Apparently opencv
uses a different glibcxx
version, so switching to another libstdc
breaks opencv
. Is there any way around this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您在其他地方(例如在您的主目录中)安装了正确版本的 libstdc++.so.6,则可以设置 LD_LIBRARY_PATH 或使用 LD_PRELOAD,请参阅
LD_PRELOAD 技巧是什么?
If you've got the correct version of libstdc++.so.6 installed elsewhere (e.g. in your home directory), you can either set LD_LIBRARY_PATH or use LD_PRELOAD, see
What is the LD_PRELOAD trick?
如果您告诉您正在运行什么操作系统,将会有所帮助。如果是 Solaris,您可能需要尝试设置 LD_NOVERSION 来告诉运行时链接器忽略共享库版本。
导出LD_NOVERSION=1
It would help if you tell what OS you are running. If it is Solaris, you might want to try setting LD_NOVERSION to tell the runtime linker to ignore the shared library versions.
export LD_NOVERSION=1
libstdc++ 常见问题解答回答了您原来的问题: http://gcc.gnu.org /onlinedocs/libstdc++/faq.html#faq.how_to_set_paths
对于更新,这种情况不应该发生。较新的
libstdc++.so
应该可以在您的LD_LIBRARY_PATH
中找到,它提供了旧版本的所有符号。也许/var/scratch/user/local/lib/libopencv_features2d.so.2.2
链接到绝对路径,而不是 SONAMElibstdc++.so.6
,你可以通过运行检查:The libstdc++ FAQ answers your original question: http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths
For the update, that shouldn't happen. The newer
libstdc++.so
thaqt should be found in yourLD_LIBRARY_PATH
provides all the symbols of the older one. Maybe/var/scratch/user/local/lib/libopencv_features2d.so.2.2
was linked to an absolute path, not to the SONAMElibstdc++.so.6
, you could check that by running:我将文件 A(/usr/lib64/libstdc++.so.6) 复制到字典 B(/opt/MATLAB/MATLAB_Compiler_Runtime/v711/sys/os/glnxa64) 并且它有效。
I copied the file A(/usr/lib64/libstdc++.so.6) to the dictionary B(/opt/MATLAB/MATLAB_Compiler_Runtime/v711/sys/os/glnxa64) and it worked.