在才开始使用Panda的过程中遇到了一个问题,这个问题之前遇到过,后来解决了也没再管过,没想到过了接近半年之后还会再使用Panda,搞了半天才找到解决办法,觉得还是真的要记录下来每个问题及当时的解决方法,保不准下一次又遇到了。。。
问题如下:
运行之后直接出现error:1
/usr/local/MATLAB/R2016b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/share/fsl/5.0/bin/fslchfiletype_exe
首先 not found 有两种情况:
- 这个 GLIBCXX_3.4.21 本来就不存在
- 这个 GLIBCXX_3.4.21 存在,但是matlab找不到,没有链接过去
在terminal处先通过以下代码看这个到底有没有:1
strings /usr/lib/libstdc++.so.6 | grep GLIBCXX
下面会出来一串相关的存在的 GLIBCXX. 找下有没有MATLAB说的那个 `GLIBCXX_3.4.21’。
如果存在的话,那就说明是matlab 链接的问题,只需要在terminal处用以下方式打开matlab就行了:1
LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab
如果不存在的话,执行以下代码:1
2
3
4sudo apt-get install libstdc++6
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get dist-upgrade
Reference:
https://askubuntu.com/questions/719028/version-glibcxx-3-4-21-not-found
https://stackoverflow.com/questions/44773296/libstdc-so-6-version-glibcxx-3-4-20-not-found
https://askubuntu.com/questions/575505/glibcxx-3-4-20-not-found-how-to-fix-this-error