Raspberry Pi: how to solve the “version `GLIBCXX_6.0.21′ not found” problem

Environment
  • Ubuntu 16.04 LTS
  • arm-linux-gnueabihf (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  • Raspberry Pi 3 Model B
Upgrade libstdc++ to 6.0.21

If you use arm-linux-gnueabihf toolchain (see Raspberry Pi: C++ cross-compiling) to build your applications for Raspberry Pi then there is a chance that you’ll have to upgrade your Raspbbery Pi libstdc++ to the toolchain’s version 6.0.21 (or later).

Ubuntu:

$ scp /usr/arm-linux-gnueabihf/lib/libstdc++.so.6.0.21 pi@192.168.0.xxx:/home/pi

Raspberry Pi:

$ sudo mv libstdc++.so.6.0.21 /usr/lib/arm-linux-gnueabihf/
$ sudo ln -s /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.21 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6

Leave a Reply

Your email address will not be published. Required fields are marked *