Search code examples
gccinstallationdebianlibc

Updating libc6 on Debian to a specific version


I use sudo apt install build-essential for downloading full stack for c compiling.

A almost all libs was downloaded without a problem, but several of them return 404 and not installed. Libs was <lib-name>_2.36-9+deb12u8_amd64.deb.

I come through link that return 404 and notice that there was no libs with that version, so i manually dowloads them and use sudo dpkg install <lib..>

/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

Situation on current moment:

sudo apt install build-essential
[sudo] password for sindrezoth: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.36-9+deb12u8) but 2.36-9+deb12u9 is to be installed
             Depends: libc-dev-bin (= 2.36-9+deb12u8) but 2.36-9+deb12u9 is to be installed

//----------------------------

sudo apt-cache policy libc6
libc6:
  Installed: 2.36-9+deb12u9
  Candidate: 2.36-9+deb12u9
  Version table:              <<----------two versions?? why then apt install don't use required version
 *** 2.36-9+deb12u9 100         <--|  
        100 /var/lib/dpkg/status   |
     2.36-9+deb12u8 500         <--|
        500 https://deb.debian.org/debian bookworm/main amd64 Packages

Linux version:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:    12
Codename:   bookworm

Please help me fix this issue.

P.S.

sudo apt update
sudo apt upgrade

Results seems all ok.


Solution

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