I heard I can do it using apt-get install libc6
, but I need to add something to /etc/apt/sources.list to receive the newest glibc version.
What should I do?
I heard I can do it using apt-get install libc6
, but I need to add something to /etc/apt/sources.list to receive the newest glibc version.
What should I do?
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 done updating libc6
, restart 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.
WARNING!!! This solution is now OBSOLETE try to find a more recent one in the list!
In fact you cannot do it easily right now (at the time I am writing this message). I will try to explain why.
First of all, the glibc is no more, it has been subsumed by the eglibc project. And, the Debian distribution switched to eglibc some time ago (see here and there and even on the glibc source package page). So, you should consider installing the eglibc package through this kind of command:
apt-get install libc6-amd64 libc6-dev libc6-dbg
Replace amd64
by the kind of architecture you want (look at the package list here).
Unfortunately, the eglibc package version is only up to 2.13 in unstable
and testing
. Only the experimental
is providing a 2.17 version of this library. So, if you really want to have it in 2.15 or more, you need to install the package from the experimental version (which is not recommended). Here are the steps to achieve as root:
Add the following line to the file /etc/apt/sources.list
:
deb http://ftp.debian.org/debian experimental main
Update your package database:
apt-get update
Install the eglibc package:
apt-get -t experimental install libc6-amd64 libc6-dev libc6-dbg
Pray!
Well, that's all folks.
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.
If you need to upgrade glibc, the safest solution may be to upgrade your Linux distribution, since most software depends on glibc.
ldd --version
Take a look at: tracker.debian.org/pkg/glibc
Excerpts from How to Upgrade Debian 10 Buster to Debian 11 Bullseye
sudo apt-mark showhold
sudo apt-mark unhold package_name
or make sure the packages will not interfere with the upgrade process.sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
/etc/apt/sources.list
: sudo nano /etc/apt/sources.list
export LC_ALL=C
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
sudo systemctl reboot