/usr/../libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by …)

寵の児 提交于 2019-11-29 12:46:56

The solution prompted by @whjiang works but have two limits:

  1. You may be required a sudo privilege to change the library symbol link.
  2. The change is global and can affect all users

So there is another.

As explained by this answer from MATLAB Central, the problem is caused by Matlab:

Matlab internally changes the LD_LIBRARY_PATH to prefer <MatlabPATH >/sys/os/<ARCH>

and the <MatlabPATH>/sys/os/libstdc++.so.6 is out of date.

The solution is set LD_PRELOAD when calling Matlab like this,

env LD_PRELOAD=/usr/lib/libstdc++.so.6  <MatlabPATH>/bin/matlab -desktop

The path of libstdc++.so.6 my be different from os to os. For example, on my LMDE2, the path is /usr/lib/x86_64-linux-gnu/libstdc++.so.6.

Here is an solution:

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

explanation and reference: http://fantasticzr.wordpress.com/2013/05/29/matlab-error-libstdc-so-version-glibcxx_3-4-15-not-found/

A simple solution from this page ( http://ubuntuforums.org/showthread.php?t=808045 ) that worked for me. Go to the matlab directory where libstdc++.so.6 and libgcc_s.so.1 are stored. In my case, this was:

cd /usr/local/MATLAB/MATLAB_Production_Server/R2015a/sys/os/glnxa64

Then rename libstdc++.so.6 and libgcc_s.so.1:

sudo mv libstdc++.so.6 libstdc++.so.6.orig
sudo mv libgcc_s.so.1 libgcc_s.so.1.orig

That's it!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!