刚刚有个偶然发现,记录在此。刚才突然意识到原来曾遇到过的一个类似错误“/opt/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./programName)”的解决方案里面提到的:
GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_3.4.20这些东西是怎么来的了!在CSDN上有很多这种包的下载资源,但是需要积分,可我当初没有积分,下载不了,还浪费了不少时间。现在终于知道这些文件原来可以轻易的就在自己的系统中获取。我把我获取到的免费提供在 这里,欢迎下载。下面是获取的具体方法:
1)系统默认gcc/g++版本是4.6.3,此时查看一下,只有这些,最高GLIBCXX_3.4.16:
me@test:$ sudo updatedb me@test:$ locate libstdc++.so.6 /opt/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6 /opt/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6.0.13 /opt/MATLAB/R2012a/sys/os/glnxa64/libstdc++.so.6 /opt/MATLAB/R2012a/sys/os/glnxa64/libstdc++.so.6.0.13 /opt/MATLAB/R2012a/toolbox/edalink/foundation/hdllink/scripts/linux32/libstdc++.so.6 /opt/MATLAB/R2012a/toolbox/edalink/foundation/hdllink/scripts/linux32/libstdc++.so.6.0.13 /opt/MATLAB/R2012a/toolbox/sldv/sldv/polyspace-dvo/lib/x86-linux/libstdc++.so.6 /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.16 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 me@test:$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_DEBUG_MESSAGE_LENGTH
me@test:$ sudo updatedb me@test:$ locate libstdc++.so.6 /opt/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6 /opt/MATLAB/R2012a/bin/glnxa64/libstdc++.so.6.0.13 /opt/MATLAB/R2012a/sys/os/glnxa64/libstdc++.so.6 /opt/MATLAB/R2012a/sys/os/glnxa64/libstdc++.so.6.0.13 /opt/MATLAB/R2012a/toolbox/edalink/foundation/hdllink/scripts/linux32/libstdc++.so.6 /opt/MATLAB/R2012a/toolbox/edalink/foundation/hdllink/scripts/linux32/libstdc++.so.6.0.13 /opt/MATLAB/R2012a/toolbox/sldv/sldv/polyspace-dvo/lib/x86-linux/libstdc++.so.6 /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.20 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 /usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.20-gdb.py /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20-gdb.py me@test:$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_3.4.20 GLIBCXX_DEBUG_MESSAGE_LENGTH
me@test:$ sudo update-alternatives --remove-all gcc me@test:$ sudo update-alternatives --remove-all g++ me@test:$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20 me@test:$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20 me@test:$ gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. me@test:$ g++ --version g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Nothing to configure. me@test:$ sudo updatedb me@test:$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_3.4.20 GLIBCXX_DEBUG_MESSAGE_LENGTH