linux - 错误 ./vpdetection :/gpfs/apps/x86_64-rhel5/matlab/R2012a/sys/os/glnxa64/libstdc++. so.6:找不到版本 `GLIBCXX_3.4.14'

标签 linux matlab g++ libstdc++

我现在尝试在 Linux 环境中运行一些 MATLAB 代码:

  • Linux 版本是 Red Hat Enterprise Linux Server 5.9 (Tikanga)。
  • gcc 版本是 4.1.2。
  • MALTAB 版本为 R2012b。

MALTAB 中导致问题的语句是:

[status, result] = system('./vpdetection lines.tmp lines.out');

我得到如下错误:

./vpdetection: /gpfs/apps/x86_64-rhel5/matlab/R2012a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found

我搜索了几个解决方案,但它们都需要编辑系统文件。 因为我在服务器上运行代码,所以我没有 sudo 权限来编辑系统文件。

是否有任何其他不需要编辑系统文件的解决方法?


我试过 ldd 命令。结果如下:

[sxh415@cyberstar vpdetection]$ ldd matlab/vpdetection
matlab/vpdetection: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by matlab/vpdetection)
matlab/vpdetection: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by matlab/vpdetection)
matlab/vpdetection: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by matlab/vpdetection)
    linux-vdso.so.1 =>  (0x00007ffff7ff8000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003845400000)
    libm.so.6 => /lib64/libm.so.6 (0x0000003840400000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003844c00000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003840000000)
    /lib64/ld-linux-x86-64.so.2 (0x000000383fc00000)

最佳答案

/gpfs/apps/x86_64-rhel5/matlab/R2012a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found

此错误表示:libstdc++.so.6 与您的 Matlab 版本一起分发太旧,并且不提供版本 `GLIBCXX_3.4.14'。 matlab 版本对应于 gcc-4.5 或更早版本,但您有一些代码是使用 gcc-4.6(或更高版本)编译的。

必须安排您的可执行文件获取更新的 libstdc++.so.6。

I don't have sudo right to edit system files.

您可以将足够新的 libstdc++.so.6 复制到 ~/lib64,然后
export LD_LIBRARY_PATH=$HOME/lib64

关于linux - 错误 ./vpdetection :/gpfs/apps/x86_64-rhel5/matlab/R2012a/sys/os/glnxa64/libstdc++. so.6:找不到版本 `GLIBCXX_3.4.14',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18559979/

相关文章:

c++ - 对静态局部变量的 undefined reference

c++ - 哪个是 G++ 4.4.1 默认分配器?

linux - 使用 jboss 7.1 将图像显示为 url

linux - 是什么在我的笔记本电脑上启动这个 docker 进程?

Python - subprocess.Popen 不返回输出

c - 我如何获取并同步所有 X11 窗口的完整列表?

matlab - 如何在 MATLAB 数据游标中以更高精度显示数字?

python - 通过 Python 但通过 Linux 命令终端调用 MATLAB

c++ - 对称矩阵中的线性索引

linux - 无法在 Linux Mint 18 或 Ubuntu 16.04 上编译 a4tech-bloody-linux-driver