How to upgrade glibc from version 2.13 to 2.15 on Debian?

后端 未结 3 1988
予麋鹿
予麋鹿 2020-11-30 18:51

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?

相关标签:
3条回答
  • 2020-11-30 19:08

    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 eglibc 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.

    Hope this helps. It took me a while to figure out.

    0 讨论(0)
  • 2020-11-30 19:08

    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:

    1. Add the following line to the file /etc/apt/sources.list:

      deb http://ftp.debian.org/debian experimental main
      
    2. Update your package database:

      apt-get update
      
    3. Install the eglibc package:

      apt-get -t experimental install libc6-amd64 libc6-dev libc6-dbg
      
    4. Pray...

    Well, that's all folks.

    0 讨论(0)
  • 2020-11-30 19:13

    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.

    0 讨论(0)
提交回复
热议问题