WhitewaterFoundry / Pengwin

A Linux distro optimized for WSL based on Debian.
Other
1.48k stars 105 forks source link

glibc 2.31 remediation #619

Closed KirkF closed 4 years ago

KirkF commented 4 years ago

My install is broken because of the glibc 2.31 issue. How do I fix this? I saw the tweet about what to do before we upgrade, but I don't check your twitter before every time I do an apt update.

Quite frankly this is exactly the type of issue that I would expect Whitewater Foundry to catch before it impacts users.

crramirez commented 4 years ago

Sadly we couldn't catch it before. Holding the package is just a measure of contention. We couldn't see the impact in how many packages have dependency of it until they released it to sid. At that time we updated pengwin-setup and in 7 days they moved the change to bullseye. And we are still working in a solution, that solves it transparently.

Sorry for the inconvenience, I will post an update here when the new image is ready and published and also step by step how to recover a broken installation.

crramirez commented 4 years ago

Hello @KirkF,

Execute the following commands to fix the error:

sudo apt update
sudo apt -y reinstall libc6=2.31-1.wsl

We are using the solution listed here: https://gist.github.com/ChrisTX/391fe201b3d72d3b3dac17066100347d

Thank you @ChrisTX for the patch

KirkF commented 4 years ago

@crramirez those commands by themself do not fix my system: ➜ ~ sudo apt update Hit:1 https://download.docker.com/linux/debian buster InRelease Hit:2 https://deb.debian.org/debian bullseye InRelease Hit:4 https://deb.debian.org/debian bullseye-updates InRelease Hit:5 https://deb.debian.org/debian-security bullseye-security InRelease Hit:3 https://packagecloud.io/whitewaterfoundry/pengwin-base/debian bullseye InRelease Hit:6 https://packagecloud.io/whitewaterfoundry/pengwin-setup/debian bullseye InRelease Hit:7 https://packagecloud.io/whitewaterfoundry/wslu/debian bullseye InRelease Reading package lists... Done Building dependency tree Reading state information... Done 84 packages can be upgraded. Run 'apt list --upgradable' to see them. ➜ ~ sudo apt -y reinstall libc6=2.31-1.wsl 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: bsdmainutils : Depends: calendar but it is not going to be installed Depends: ncal but it is not going to be installed libc-bin : Depends: libc6 (< 2.31) but 2.31-1.wsl is to be installed libc6-dbg : Depends: libc6 (= 2.31-1) but 2.31-1.wsl is to be installed libc6-dev : Depends: libc6 (= 2.31-1) but 2.31-1.wsl is to be installed locales : Depends: libc-bin (> 2.31) but 2.30-8 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I've also tried the --fix-broken install command on the last line

➜ ~ sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following additional packages will be installed: calendar libc-bin ncal The following NEW packages will be installed: calendar ncal The following packages will be upgraded: libc-bin 1 upgraded, 2 newly installed, 0 to remove and 83 not upgraded. 8 not fully installed or removed. Need to get 0 B/953 kB of archives. After this operation, 498 kB of additional disk space will be used. Do you want to continue? [Y/n] y Setting up libc6:amd64 (2.31-1) ... Checking for services that may need to be restarted... Checking init scripts... Nothing to restart. sleep: cannot read realtime clock: Invalid argument dpkg: error processing package libc6:amd64 (--configure): installed libc6:amd64 package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: libc6:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)

crramirez commented 4 years ago

Ok execute sudo apt-mark unhold libc6 and try again

KirkF commented 4 years ago

@crramirez ➜ ~ sudo apt-mark unhold libc6 libc6 was already not hold. ➜ ~ sudo apt -y reinstall libc6=2.31-1.wsl 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: bsdmainutils : Depends: calendar but it is not going to be installed Depends: ncal but it is not going to be installed libc-bin : Depends: libc6 (< 2.31) but 2.31-1.wsl is to be installed libc6-dbg : Depends: libc6 (= 2.31-1) but 2.31-1.wsl is to be installed libc6-dev : Depends: libc6 (= 2.31-1) but 2.31-1.wsl is to be installed locales : Depends: libc-bin (> 2.31) but 2.30-8 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

crramirez commented 4 years ago

Well, I recommend to install all these packages at once:

sudo apt -y reinstall libc6=2.31-1.wsl libc-bin=2.31-1.wsl libc-bin=2.31-1.wsl libc6-dbg=2.31-1.wsl libc6-dev=2.31-1.wsl locales=2.31-1.wsl

KirkF commented 4 years ago

I tried reinstalling all of those as well as libc-dev-bin ➜ ~ sudo apt -y reinstall libc6=2.31-1.wsl libc-bin=2.31-1.wsl libc6-dbg=2.31-1.wsl libc6-dev=2.31-1.wsl locales=2.31-1.wsl libc-dev-bin=2.31-1.wsl 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: bsdmainutils : Depends: calendar but it is not going to be installed Depends: ncal but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Still doesn't work and tried apt --fix-broken install again as well with same results

crramirez commented 4 years ago

Could you try to install calendar and ncal to see why they are not going to be installed?

KirkF commented 4 years ago

@crramirez it was those same dependencies, but what worked is adding them to the end of the chain, so the full command ➜ ~ sudo apt -y reinstall libc6=2.31-1.wsl libc-bin=2.31-1.wsl libc6-dbg=2.31-1.wsl libc6-dev=2.31-1.wsl locales=2.31-1.wsl libc-dev-bin=2.31-1.wsl calendar ncal

Thanks for your help

crramirez commented 4 years ago

Thanks to you, for your patience I will publish this command to help others that may be stuck

asemblR commented 3 years ago

I too have the same error!!! Help Me

Clipboard01-1

crramirez commented 3 years ago

@asemblR did you run sudo apt update before?