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

Most upvoted comments

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

libstdc++6

Hi, guys, just use this command to upgrade libstdc++6 is enough: sudo apt-get install --only-upgrade libstdc++6 rather than sudo apt-get upgrade libstdc++6 The latter one will upgrade all packages, which needs a long time

In summary: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 sudo apt-get install --only-upgrade libstdc++6

Hi, you’re needs upgrade libstd.

apt-get update
apt-get install libstdc++6

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

$ strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 | 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

The following instructions helped me upgrade libstdc++6 : sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get upgrade

to 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/myLibs python3 my_script.py The system will then try to find libstdc++6 first in the directory /opt/myLibs before looking in other parts of your system.

上述的办法好像有的404了,根据这个博客,进行替换更高版本的libstdc++.so.6即可,我选的是libstdc++.so.6.0.26解决了,这问题太折磨人了 https://blog.csdn.net/SweetSeven_/article/details/110186738

上述的办法好像有的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