So i decide again unpack all downloaded packages.
~/debs$ ls
libc6_2.36-9+deb12u9_amd64.deb libc-bin_2.36-9+deb12u9_amd64.deb
libc6-dev_2.36-9+deb12u9_amd64.deb libc-dev-bin_2.36-9+deb12u9_amd64.deb
~/debs$ sudo dpkg -i *.deb
And suddenly on this attempt there are successfully unpack without a problem.
Next step was ofcourse sudo apt install build-essential, and it is install successfully too.
[HowTo] Upgrade libc6 on Debian Stable (Wheezy) - Linux & Unix
Is it safe to manually upgrade libc6 on debian stretch?
Question: is it safe to compile libc.so.6 manually and upgrade it to 2.28?*
No.
Is there a better way to do this?
https://people.debian.org/~gwolf/raspberrypi3/20190206/
https://wiki.debian.org/RaspberryPi3
https://packages.debian.org/buster/iptables
More on reddit.comHow do you upgrade glibc on Debian? - Stack Overflow
Killed my system by accidentally upgrading libc6 to sid version.
I'm running raspbian, which is based on debian stretch.
I need a newer version of iptables, namely 1.8, instead of the 1.6 version shipped with the distro.
I could compile iptables 1.8 fine, but the installed libxtables.so.12 is now too old (version 1.6.0 from the repo). If I replace it with the newer lib compiled along with iptables 1.8, I get a dependency error saying I need libc6 2.28, instead of the currently installed 2.24.
Question: is it safe to compile libc.so.6 manually and upgrade it to 2.28?*
Is there a better way to do this?
Question: is it safe to compile libc.so.6 manually and upgrade it to 2.28?*
No.
Is there a better way to do this?
https://people.debian.org/~gwolf/raspberrypi3/20190206/
https://wiki.debian.org/RaspberryPi3
https://packages.debian.org/buster/iptables
You can upgrade your Stretch to beta version of Debian (Buster).There is libc (2.28-8), iptables (1.8.2-4) and so on.
I would not recommend mixing and matching packages meant for different major versions of a distro because sometimes dependencies are pulled in that destablize the whole. If at all possible I would "rebuild" the server elsewhere where the packages sources haven't mixed because libc is a major thing to have changed...
As others have suggested, is it possible for you to run your services inside something like docker so each can have the environment it wants without polluting that of the host? That way if things go sideways you can tear down the container and build a new one...
TLDR; I'm worried for your server because it sounds like you have "crossed the streams".
Finally got a solution:
apt install libc6/stretch libc6-dev/stretch libc-dev-bin/stretch libc-bin/stretch locales/stretch linux-libc-dev/stretch
Another user have the same problem and fortunately someone find the solution here.
Following the comment response...
Start by checking that when you run a program you get a copy of the dynamic linker that does not involve that path. You should see:
$ ldd /bin/ls | grep ld-linux
/lib64/ld-linux-x86-64.so.2 (0x00007fc695aef000)
(The hex address may differ.) This file should be a symlink pointing to /lib/x86_64-linux-gnu/ld-2.13.so which should not be a symlink and certainly shouldn’t end up at ld-2.11.2.so.
Assuming this all looks right it should be safe to go ahead and rename /lib/ld-2.11.2.so out of the way (though I would have rescue media to hand nevertheless). Don’t delete it until you’re sure everything’s still OK, in case it turns out that you need to put it back!
You may well find there are complaints about other leftover files, which can be check and dealt with in much the same way.
Obviously this advice is not directly tested!
I had this problem. . .finally fixed it by
- chroot-ing into the damaged/ stalled system, where I
- mv'ed a bunch of lib.so's out of lib/i38 into a temp folder in that partitions /root and
- creating symlinks to each of these. At this point it became possible to
- boot into that partition and then
- upgrade as usual. ( The exact list of files does not spring to mind and will anyway probably vary from system to system - it included the GNU-threads lib and some others, each of which raised the dreaded - lib in unexpected location message) After the upgrade the new libs will be in the usual /lib/i386( or your equivalent) and the LSB dependency boot will have created fresh symlinks for you. When satisfied that all is well you can then destroy the temp folder and the .so's moved there earlier. Hope this may help...
I was able to install libc6 2.17 in Debian Wheezy by editing the recommendations in perror's answer:
IMPORTANT
You need to exit out of your display manager by pressing CTRL+ALT+F1.
Then you can stop x (slim) with sudo /etc/init.d/slim stop
(replace slim with mdm or lightdm or whatever)
Add the following line to the file /etc/apt/sources.list:
deb http://ftp.debian.org/debian experimental main
Should be changed to:
deb http://ftp.debian.org/debian sid main
Then follow the rest of perror's post:
Update your package database:
apt-get update
Install the glibc package:
apt-get -t sid install libc6-amd64 libc6-dev libc6-dbg
IMPORTANT
After updating libc6, restart the computer, and you should comment out or remove the sid source you just added (deb http://ftp.debian.org/debian sid main), or else you risk upgrading your whole distro to sid.
Your script contains errors as well, for example if you have dos2unix installed your install works but if you don't like I did then it will fail with dependency issues.
I found this by accident as I was making a script file of this to give to my friend who is new to Linux and because I made the scripts on windows I directed him to install it, at the time I did not have dos2unix installed thus I got errors.
here is a copy of the script I made for your solution but have dos2unix installed.
#!/bin/sh
echo "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update
apt-get -t sid install libc6 libc6-dev libc6-dbg
echo "Please remember to hash out sid main from your sources list. /etc/apt/sources.list"
this script has been tested on 3 machines with no errors.
Hello everyone, I am currently running a buster system and accidentally upgraded my libc6 to the latest sid version. I am trying to revert to the old version, but when using:apt-get libc6=...
Bu I get the error message:/usr/bin/python3: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory Does someone have an Idea how I can fix that? Because it seems i need libc6 to install libc6...
SOLVED: For anyone stumbling into this, or a similar error in 6 years:
Here is my solution, which is heavy inspired by this post.
1.Use a boot-USB to get into recovery mode, pick your partition and start a shell on the partition.
2. Download the libc6 version you want for example with wget.
3. Extract the package with dpkg -x <pagk.deb> ./newlib
4. Now quit and change to the shell on your Recovery-USB
5. Replace the new library with the old cp -avf newlib/lib/x86_64-linux-gnu/* /target/lib/x86_64-linux-gnu/
6. You should be able to boot again. apt-get should work now to.
7. Reinstall all broken packeges (including libc6) with apt get.