Score:0

Accidentally downgraded libstdc++6:amd64 from 12.1.0-2ubuntu1~22.04 to 10-20200411-0ubuntu1

br flag

Why trying to get debug symbols for gcc/g++, I accidentally downgraded libstdc++6:i386 and libstdc++6:amd64 from 12.1.0-2ubuntu1~22.04 to 10-20200411-0ubuntu1 by running the following commands

wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libstdc++6_10-20200411-0ubuntu1_i386.deb
sudo dpkg -i libstdc++6_10-20200411-0ubuntu1_i386.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libstdc++6_10-20200411-0ubuntu1_amd64.deb
sudo dpkg -i libstdc++6_10-20200411-0ubuntu1_amd64.deb

Followed by errors like

dpkg: warning: downgrading libstdc++6:i386 from 12.1.0-2ubuntu1~22.04 to 10-20200411-0ubuntu1
(Reading database ... 662778 files and directories currently installed.)
Preparing to unpack libstdc++6_10-20200411-0ubuntu1_i386.deb ...
De-configuring libstdc++6:amd64 (12.1.0-2ubuntu1~22.04), to allow configuration of libstdc++6:i386 (12.1.0-2ubuntu1~22.04) ...
Unpacking libstdc++6:i386 (10-20200411-0ubuntu1) over (12.1.0-2ubuntu1~22.04) ...
dpkg: error processing package libstdc++6:i386 (--install):
 package libstdc++6:i386 10-20200411-0ubuntu1 cannot be configured because libstdc++6:amd64 is at a different version (12.1.0-2ubuntu1~22.04)
dpkg: error processing package libstdc++6:amd64 (--install):
 package libstdc++6:amd64 12.1.0-2ubuntu1~22.04 cannot be configured because libstdc++6:i386 is at a different version (10-20200411-0ubuntu1)
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 libstdc++6:i386
 libstdc++6:amd64

Now lots of commands no longer work, especially apt for example

sudo apt-get update
apt-get: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libapt-private.so.0.0)
apt-get: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)

Advise needed.

Score:0
br flag

For posterity's sake here is what I did to solve the problem in my case

Get the packages for the libraries that I accidentally downgraded and then installed them.

wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-12/libstdc++6_12.1.0-2ubuntu1~22.04_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-12/libstdc++6_12.1.0-2ubuntu1~22.04_i386.deb
sudo dpkg -i libstdc++6_12.1.0-2ubuntu1~22.04_amd64.deb
sudo dpkg -i libstdc++6_12.1.0-2ubuntu1~22.04_i386.deb

The --force-all option mat be required in some cases.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.