I tried to upgrade Ubuntu 18.04 LTS to 20.04 LTS in WSL (maybe before it was available for WSL) and it failed to upgrade. After that attempt, I am not able to upgrade any packages using sudo apt-get upgrade citing an issue of unmet dependencies. I have tried out many possible solutions from the net and none of them works.
Please let me know how to fix this issue.
(The way I understand this, the WSL has partially upgraded to Ubuntu 20.04 and did not downgrade back the changed packages as it was in Ubuntu 18.04. So maybe downgrading the 2 mentioned packages is supposed to work.)
The following is where the issue lies:
(base) sambit98@A-K-MISHRA:/mnt/d/SAMBIT/UBUNTU$ sudo apt-get update
Hit:1 focal-security InRelease
Hit:2 focal InRelease
Get:3 focal-updates InRelease [89.1 kB]
Hit:4 focal-backports InRelease
Fetched 89.1 kB in 3s (34.5 kB/s)
Reading package lists... Done
(base) sambit98@A-K-MISHRA:/mnt/d/SAMBIT/UBUNTU$ sudo apt-get upgrade
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.28) but 2.31-0ubuntu9 is installed locales : Depends: libc-bin (> 2.31) but 2.27-3ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
(base) sambit98@A-K-MISHRA:/mnt/d/SAMBIT/UBUNTU$ The following are my system specifications right now (if needed):
(base) sambit98@A-K-MISHRA:/mnt/d/SAMBIT/UBUNTU$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 142
Model name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Stepping: 10
CPU MHz: 2001.000
CPU max MHz: 2001.0000
BogoMIPS: 4002.00
Virtualization: VT-x
Hypervisor vendor: Windows Subsystem for Linux
Virtualization type: container
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt ibrs ibpb stibp ssbdEDIT 1: I am using WSL version 1 on Windows 10 Version 1909 (OS Build 18363.815).
41 Answer
gives useful steps to get out of the problem, although you might have to unhold some packages like I had to:
These are the commands I ran:
wget
dpkg --install libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
apt-mark hold libc6
apt-mark unhold libc6-bin
apt --fix-broken install
apt full-upgradeAnd it seems to be upgrading ok.