2

Hello serverfault community!

After upgrading to Debian Buster apt doesn't seem to work in any way. I've read and tried several solutions but none of these worked.

Output when I try to install any package or execute apt dist-upgrade:

Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 busybox : Depends: libc6 (>= 2.28) but 2.24-11+deb9u4 is installed
 libnih1 : Depends: libc6 (> 2.28) but 2.24-11+deb9u4 is installed
 locales : Depends: libc-bin (> 2.28) but 2.24-11+deb9u4 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Now when apt-get --fix-broken install is executed:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  gnupg-l10n libzstd1 php-mysql php-phpseclib
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libc-bin libc6
Suggested packages:
  glibc-doc
The following packages will be upgraded:
  libc-bin libc6
2 upgraded, 0 newly installed, 0 to remove and 183 not upgraded.
6 not fully installed or removed.
Need to get 0 B/3656 kB of archives.
After this operation, 1821 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 35641 files and directories currently installed.)
Preparing to unpack .../libc6_2.28-10_amd64.deb ...


dpkg: error processing archive /var/cache/apt/archives/libc6_2.28-10_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.28-10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Inbetween a blue screen pops up, saying:

Kernel must be upgraded
This version of the GNU libc requries kernel version 3.2 or later. Please upgrade your kernel before installing glibc.

The funny thing is, the kernel can't be updated since apt dist-upgrade doesn't work due to the above error.

apt policy libc6 returns:

libc6:
  Installed: 2.24-11+deb9u4
  Candidate: 2.28-10
  Version table:
     2.28-10 500
        500 http://httpredir.debian.org/debian buster/main amd64 Packages
 *** 2.24-11+deb9u4 100
        100 /var/lib/dpkg/status

apt-get install --reinstall libc6

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 (< 2.25) but 2.28-10 is to be installed
 locales : Depends: libc-bin (> 2.28) but 2.24-11+deb9u4 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

apt-cache policy

Package files:
 100 /var/lib/dpkg/status
     release a=now
 100 http://deb.debian.org/debian buster-backports/main amd64 Packages
     release o=Debian Backports,a=buster-backports,n=buster-backports,l=Debian Backports,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org buster/updates/non-free amd64 Packages
     release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=non-free,b=amd64
     origin security.debian.org
 500 http://security.debian.org buster/updates/main amd64 Packages
     release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://httpredir.debian.org/debian buster-updates/non-free amd64 Packages
     release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=non-free,b=amd64
     origin httpredir.debian.org
 500 http://httpredir.debian.org/debian buster-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=main,b=amd64
     origin httpredir.debian.org
 500 http://httpredir.debian.org/debian buster/non-free amd64 Packages
     release v=10.6,o=Debian,a=stable,n=buster,l=Debian,c=non-free,b=amd64
     origin httpredir.debian.org
 500 http://httpredir.debian.org/debian buster/contrib amd64 Packages
     release v=10.6,o=Debian,a=stable,n=buster,l=Debian,c=contrib,b=amd64
     origin httpredir.debian.org
 500 http://httpredir.debian.org/debian buster/main amd64 Packages
     release v=10.6,o=Debian,a=stable,n=buster,l=Debian,c=main,b=amd64
     origin httpredir.debian.org

uname -a

Linux 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64 GNU/Linux

Removing packages (like libc6) does not work either, returning the above errors. apt autoclean does not help also.

How can I get apt to work again?

Orca37
  • 21
  • 1
  • 3
  • 1
    What did you do to your apt sources? – Michael Hampton Dec 02 '20 at 17:08
  • Before updating I replaced the old ones with debian buster sources and added buster-packports. I've posted the output of apt-cache policy now, does that help? Other information needed? Is there a way to reset apt (sources)? – Orca37 Dec 02 '20 at 17:30
  • 1
    That's rather bizarre. What ancient version of Debian did you try to upgrade _from_? AFAIK skipping releases is a good way to break your system, and it looks like you skipped several releases. – Michael Hampton Dec 02 '20 at 17:33
  • @MichaelHampton the `2.24-11+deb9u4` is 9.x version of the libc6, I am not sure what you are seeing that makes you think they skipped? stretch to buster should be fine. – Zoredache Dec 02 '20 at 18:50
  • @Zoredache Running a kernel older than 3.2? Though that's a good catch. Looks like this system had some sort of serious problems before the upgrade. – Michael Hampton Dec 02 '20 at 19:05
  • I initially upgraded from Debian 8. On 9 everything was fine, then I decided to upgrade to 10, that were when the problems started. I wanted to upgrade the kernel then and noticed that apt won't do anything. Trying to install linux-image-64 also results in the dependencies errors above. Also libc6 can't be removed to reinstall it afterwards because many other packages rely on that being installed. What is there else to be tried? – Orca37 Dec 03 '20 at 07:22
  • Can you provide the result of `uname -a`? If you are running in an OpenVZ environment you might be out of luck because until recently there were only RHEL6 based 2.6.x kernels, though there appear to exist RHEL7 3.10 kernels available now. – A.B Dec 03 '20 at 08:13
  • I added the output of uname -a (Linux 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64 GNU/Linux). It think it is an OpenVZ environment indeed. Does that mean in order to get my vserver running properly again the host environment needs to be upgraded? – Orca37 Dec 03 '20 at 11:12
  • Yes the host has to be upgraded. There appears to be OpenVZ environments based on kernel 3.10 or even on KVM (letting you use your own kernel). See this announcement: https://openvz.livejournal.com/53870.html – A.B Dec 03 '20 at 11:17
  • That kernel is over 10 years old; it's no surprise you are finally running into trouble. As @A.B mentioned OpenVZ 7 does have a newer kernel, that should work with Debian 10, but I am firmly of the opinion, based on years of experience, that everyone should just avoid OpenVZ entirely. There are plenty of places to get a VPS with a more reasonable (real) hypervisor such as KVM. – Michael Hampton Dec 03 '20 at 14:58
  • Okay, I will consider an other and newer environment. Thank you all!! – Orca37 Dec 05 '20 at 08:45

0 Answers0