执行二进制文件:“GLIBCXX_3.4.11”未找到

发布于 2024-11-14 10:14:03 字数 919 浏览 2 评论 0原文

我正在尝试运行一些预编译的代码,但出现以下错误:

./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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

烟花肆意 2024-11-21 10:14:03

如果您在其他地方(例如在您的主目录中)安装了正确版本的 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?

稚气少女 2024-11-21 10:14:03

如果您告诉您正在运行什么操作系统,将会有所帮助。如果是 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

铁憨憨 2024-11-21 10:14:03

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 链接到绝对路径,而不是 SONAME libstdc++.so.6,你可以通过运行检查:

ldd /var/scratch/user/local/lib/libopencv_features2d.so.2.2

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 your LD_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 SONAME libstdc++.so.6, you could check that by running:

ldd /var/scratch/user/local/lib/libopencv_features2d.so.2.2
挽袖吟 2024-11-21 10:14:03

我将文件 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文