tensorflow-on-arm: libstdc++.so.6: version `GLIBCXX_3.4.22' not found
Hi, This is a great project. When I install it in my pi 3B and import tensorflow,there had a importerror:ImportError: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.22’ not found (required by /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (1 by maintainers)
Commits related to this issue
- https://github.com/lhelontra/tensorflow-on-arm/issues/13#issuecomment-489296444 — committed to pytorch/rl by vmoens a year ago
- https://github.com/lhelontra/tensorflow-on-arm/issues/13#issuecomment-489296444 — committed to pytorch/rl by vmoens a year ago
I originally encountered this error message after trying to run Matrix Laboratory from the terminal command prompt. I encountered a thread on Matlab answers that helped fix the problem. This may or may not apply in your particular situation, but it is worth giving this a try. I posted a link to the original discussion thread at the bottom.
Try these commands, you need to upgrade your libstdc++6 version. If first command can’t run, just run other three. I hope it can help you.
%code sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 sudo apt-get upgrade libstdc++6
https://www.mathworks.com/matlabcentral/answers/389024-why-does-matlab-r2018a-display-erroneous-message-on-ubuntu-16-04?s_tid=answers_rc1-2_p2_MLT
Hi, guys, just use this command to upgrade libstdc++6 is enough:
sudo apt-get install --only-upgrade libstdc++6rather thansudo apt-get upgrade libstdc++6The latter one will upgrade all packages, which needs a long timeIn summary:
sudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get updatesudo apt-get install gcc-4.9sudo apt-get install --only-upgrade libstdc++6Hi, you’re needs upgrade libstd.
I ran into the same issue while installing tensorflow 1.8.0 on Ubuntu-Mate 1604. libstdc++6 package had already been update to its latest version.
I tried the command strings on /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
The following instructions helped me upgrade libstdc++6 :
sudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get updatesudo apt-get upgradeto use the correct version of libstdc++, you can copy over the libraries you linked against to the target machine.
On the machine that you used to compile tensorflow, copy over all files
tensorflow-on-arm/build_tensorflow/sources/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/lib/libstdc++*to a directory on your target machine (say to/opt/myLibs/). Then, point the variable LD_LIBRARY_PATH to that directory before you execute tensorflow.export LD_LIBRARY_PATH=/opt/myLibspython3 my_script.pyThe system will then try to findlibstdc++6first in the directory/opt/myLibsbefore looking in other parts of your system.上述的办法好像有的404了,根据这个博客,进行替换更高版本的libstdc++.so.6即可,我选的是libstdc++.so.6.0.26解决了,这问题太折磨人了 https://blog.csdn.net/SweetSeven_/article/details/110186738
请用英语交流 Please use English to communicate here
I’m using Debian 11 and trying to import a KerasClassifiier What worked for me was only: sudo apt-get upgrade libstdc++6
I use “conda install -c conda-forge gcc=12.1.0” fix ‘GLIBCXX_3.4.30’ not found error