Ubuntu – GLIBCXX_3.4.20 not found, how to fix this error

gcclibrariesppashared library

Whey I try to run the program Layout Editor (available on this site) on Ubuntu 14.04.1 64-bit LTS I get the following output in the terminal:

$ layout
layout: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by layout)

I tried the command strings on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 as following and here is the input and the output:

$ strings /usr/lib/x86_64-linux-gnu/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_DEBUG_MESSAGE_LENGTH

How can I resolve this issue I somehow guess that it is related with GCC but cannot figure out how to fix the problem. Furthermore, I have tried a PPA as suggested on How do I use the latest GCC on Ubuntu? and there is a similar question for an older version of Ubuntu at GLIBCXX_3.4.15 not found. However, after I ran sudo update I get numerous warnings and the list I obtained with the strings command did not have new entries after installing gcc 4.9, so I purged the PPA(Toolchains Test Builds) with ppa-purge. Any help, suggestions on how to proceed are greatly appreciated.

Best Answer

I was having the same problem when trying to run other program, and found a solution on StackOverflow.

Basically, just do the following commands: Firstly, install:

sudo apt-get install libstdc++6

This should already be installed by default, but try it anyway. If it doesn't solve it, just do the following:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

I didn't perform the "dist-upgrade" command, but the ones before solved it for me

Related Question