Operating System: Debian GNU/Linux 11 (bullseye)

Debian version: 11.5

apt history and dpkg history

I tried to install multiple packages using dpkg somefile.deb but it hasn't completed as having dependency problems due to lack of the internet connection.

Now that I run 'apt update' or 'apt-get update', I get these errors:

apt-get: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
apt-get: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
apt-get: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
  • 1
    The usual problem is that you use a .deb not intended to be used for your specific distribution/version. You didn't specify what it is: is it Debian, Ubuntu, something else? Then which release of it? Once you know this you can ponder where you got the package from, and if it was intended for your distribution/version. Also if that's actually apt-get which complains, rather than the package to be installed, then you might have damaged your system and should give the history of what you installed and how. Part of the history can be found in /var/log/apt/ and /var/log/dpkg*
    – A.B
    Commented Oct 19, 2022 at 11:26
  • @A.B My server runs Debian 11.5 and yes, apt-get complains. I edited the original post and added the related logs you have mentioned. Thanks. Commented Oct 20, 2022 at 11:52

1 Answer 1


The culprit is package libstdc++6 which was upgraded to Debian testing/sid, preventing apt-get, which is a C++ application, to work anymore.

2022-10-18 10:37:01 upgrade libstdc++6:amd64 10.2.1-6 12.2.0-5
2022-10-18 10:37:01 status triggers-pending libc-bin:amd64 2.31-13+deb11u4
2022-10-18 10:37:01 status half-configured libstdc++6:amd64 10.2.1-6
2022-10-18 10:37:01 status unpacked libstdc++6:amd64 10.2.1-6
2022-10-18 10:37:01 status half-installed libstdc++6:amd64 10.2.1-6
2022-10-18 10:37:01 status unpacked libstdc++6:amd64 12.2.0-5

apt-get is not available anymore, but it leaves dpkg, a C application and thus not affected, to fix the problem.

So revert what you tried to installed that isn't intended for Debian 11: most likely lokinet-bin (its suffix does suggest it's not for Debian 11 but future Debian 12).

dpkg --purge lokinet-bin

Download from out-of-band information the correct libstdc++6 package. On any other functional Debian 11 system this would work:

apt-get --print-uris download libstdc++6

which could for example return (today):

'http://ftp.us.debian.org/debian/pool/main/g/gcc-10/libstdc%2b%2b6_10.2.1-6_amd64.deb' libstdc++6_10.2.1-6_amd64.deb 492540 SHA256:5c155c58935870bf3b4bfe769116841c0d286a74f59eccfd5645693ac23f06b1

which could then be downloaded from any mirror, including the mirror above, either from an other system and then transferred or directly on the damaged system if a download tool is available:

curl -JRLO 'http://ftp.us.debian.org/debian/pool/main/g/gcc-10/libstdc%2b%2b6_10.2.1-6_amd64.deb'

and be compared with the checksum from above:

$ sha256sum libstdc%2b%2b6_10.2.1-6_amd64.deb
5c155c58935870bf3b4bfe769116841c0d286a74f59eccfd5645693ac23f06b1  libstdc%2b%2b6_10.2.1-6_amd64.deb

checksums match.

You can also get it following links at https://packages.debian.org/bullseye/libstdc++6 or from https://snapshot.debian.org/

Finally install it over the offending version on the damaged system:

dpkg -i libstdc%2b%2b6_10.2.1-6_amd64.deb

apt-get should now become functional.

Before attempting again what you tried, please have a look at this Debian wiki: DontBreakDebian and especially Don't make a FrankenDebian, because that's exactly what happened in this case.

  • 1
    Wow! Now it works. Thanks a lot for your amazing help in details. Commented Oct 20, 2022 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .