I just upgraded to Ubuntu xenial, 16.04. When I try to do apt-get, I get the error

apt-get: relocation error: /usr/lib/i386-linux-gnu/libapt-pkg.so.5.0: symbol [long symbol omitted] version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

I tried solutions at apt: relocation error: version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference:

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb

but the system complains this is going back to an old version of libstdc++6:

dkpg: warning: downgrading libstdc++6:i386 from 8.1.0-5ubuntu1!14.04 to 5.4.0-6ubuntu~16.04.10

and refuses to continue because libstdc++6:i386 break libkolabxml1.

That page also suggests using ppa-purge (but it's not installed) and apt-add-repository (but apt isn't working).

I have also tried installing aptitude itself, the xenial version for i386. It complains that it needs libcwidget3v5 and libsigc++-2.0-0v5. But it can't install these because it breaks dependencies if it tries.

When I've run across a mess of dependencies like this before, it turned out I had something at the top level that was of the wrong sort.

What's the fix? I'd imagine if I can get apt working, I can get other things repaired. I'd be willing to run the upgrade process again, but do-release-upgrade fails because it can't use apt.

Some further requested detail.

Output of dpkg --print-architecture: i386

Output of dpkg --print-foreign-architecture: [no output]

Output of ldd /usr/lib/i386-linux-gnu/libapt-pkg.so.5.0 | grep local: [no output]

Output of ldd /usr/lib/i386-linux-gnu/libstdc++.so.6 | grep local: [no output]

  • 1
    Please edit your question to include the outputs of dpkg --print-architecture and dpkg --print-foreign-architectures Aug 23, 2019 at 1:27
  • 1
    Please add output of ldd /usr/lib/i386-linux-gnu/libapt-pkg.so.5.0 | grep local and ldd /usr/lib/i386-linux-gnu/libstdc++.so.6 | grep local to the question.
    – N0rbert
    Aug 23, 2019 at 8:27
  • Output requested, done! Aug 23, 2019 at 13:47
  • pkconf refresh and pkcon get-updates also pkcon repo-list maybe this way we get an overview.
    – nobody
    Aug 27, 2019 at 12:49
  • Please see echo $LD_LIBRARY_PATH and see the track of depends ldd /usr/bin/apt-get. Aug 27, 2019 at 17:56

1 Answer 1


Try forcing the installation of libstdc++6 by using:

dpkg -i --force-downgrade --force-depends libstdc++6...

If they don't work, you can also try --force-all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.