1

Here is the thing. I'm lost. I downgraded from Debian 10 buster (testing) to Debian 9 stretch (stable) by editing the /etc/apt/sources.list file.

I typed :

apt-get update
apt-get upgrade
apt-get dist-upgrade

All worked, lsb_release -a shown me a Debian 9 stretch version.

After that I typed these commands

apt-get clean
apt autoremove

Which shown me an error with python3.5-minimal and python3-minimal So I tried to uninstall it

apt-get remove --purge python3

There starts the big troubles Since this moment, it seems that all the GLIBC is broken. At each basic command I write, there is this kind of output.

host:~# apt
apt: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0)
-
host:~# wget
wget: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/lib/x86_64-linux-gnu/libgnutls.so.30)
wget: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.26' not found (required by /usr/lib/x86_64-linux-gnu/libp11-kit.so.0)
-
host:~# dpkg -i libc6_2.24-11+deb9u4_amd64.deb
(Reading database ... 407 files and directories currently installed.)
Preparing to unpack libc6_2.24-11+deb9u4_amd64.deb ...
/usr/bin/perl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /usr/bin/perl)
dpkg: error processing archive libc6_2.24-11+deb9u4_amd64.deb (--install):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 libc6_2.24-11+deb9u4_amd64.deb

I can't even connect to SSH anymore. I have a rescue console which allows me to write some commands but I can't download anything.

Is there something like a cache where I could get back python/glibc ?

1

So you have definitely created FrankenDebian. Depending on how mangled things are it maybe faster to backup any important data and reinstall from scratch. This time taking care to follow the advice of the Wiki and not mixing releases. I have found this GitHub page that could assist in saving your current install.

To get to your question, yes there should be a way for you to reinstall python and glibc.

Checkout /var/cache/apt/archives for .deb packages of python and/or glibc. For python, if you are running Debian Stretch on a 64-bit system it should be: python3_3.5.3-1_amd64.deb. Which can be downloaded manually from here.

Once you have found the packages or downloaded them manually you need to run the following as root(sudo) to install them:

dpkg -i [Name of the Package].deb

If you are reinstalling any libraries you can download them manually from packages.debian.org. Once downloaded then you need to copy the library file into /usr/lib and run this command as root(sudo):

ldconfig -n -v /usr/lib

Now apt should no longer complain about these packages. Remember if you need to manually install the packages that you also grab the dependencies they list as well.

If you continue to receive errors...

Then you will need to follow user Avinash Raj's advice in this post.

Any package that dpkg is complaining about you need to run the following:

sudo dpkg -P [Name of Problematic Package]

After you have run the above command for each problem package that apt complains about then you need to run:

sudo apt-get install -f

Now the issue should be solved. If need be, reference this guide and follow each of the steps to work your install back into working order.

Please comment if you have any questions or issues with this answer. I highly suggest you read through each link I have provided thoroughly before attempting the commands. I appreciate feedback to correct any misconceptions and to improve my posts. I can update my answer as needed.

Best of Luck!

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.