打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
`GLIBCXX_3.4.15' not found matlab Ubuntu


Invalid MEX-file '/home/tiago/Documents/MATLAB/mexopencv/+cv/findChessboardCorners.mexa64': /usr/local/MATLAB/R2012b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by usr/local/lib/libopencv_calib3d.so.2.4)



If anyone have this problem and using LD_PRELOAD worked as well, it may be useful to change the matlab shortcut (matlab.desktop) adding a line like:
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libstdc++.so.6

if you don't know where is libstdc++.so.6, just write on the terminal:
locate libstdc++.so.6

------------------------------------------------------------------------------------------------------------------

Although I check with commands in terminal

strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC

which shows version GLIBCXX_3.4.15 exists, MATLAB still repeats this error. After googling, I found that MATLAB searches the libraries firstly within its own library path /usr/local/MATLAB/R2012a/bin/glnxa64/ or /usr/local/MATLAB/R2012a/sys/os/glnxa64 and then the system library path. The build-in library is somehow out-of-date, and the version GLIBCXX_3.4.15 doesn’t exist in the old library. 

I tried to rename the build-in library into another name so that MATLAB can be forced to find the correct one, but there still many other candidates library files with the same name which are prior in the searching order. I need to rename all these old libraries with the same name to help MATLAB direct to correct one, which would be troublesome. 

Finally, I found an easy way to solve the problem by linking the correct library file with the MATLAB firstly searched old library file, i.e.,

sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 /usr/local/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6

After running this command in my terminal, the world calms down.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Rstudio Server 不同R版本配置和切换
Caffe + Ubuntu 15.04(16.04) + CUDA 7.5(8) 新手安装配置指南
linux 出现类似常见问题ImportError: libxxx: 或 'GLIBCXX
运行应用程序时出现GLIBCXX_3.4.26not found问题_version `glibcxx_3.4.26' not found
tcmalloc jemalloc 和ptmalloc 对比
转 Ubuntu 12.04 安装 Oracle 11G 小计
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服