Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 4201  / 2 Years ago, sat, june 18, 2022, 11:40:34

I can't install packages with apt. I am using Ubuntu 20.04 Focal.


Some packages require linux-image-5.11.0-38-generic, as seen below.


:~$ sudo apt install <package>

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:
linux-image-generic-hwe-20.04 : Depends: linux-image-5.11.0-38-generic but it is not going to be installed
linux-modules-5.11.0-38-generic : Depends: linux-image-5.11.0-38-generic but it is not going to be installed or
linux-image-unsigned-5.11.0-38-generic but it is not going to be installed
linux-modules-extra-5.11.0-38-generic : Depends: linux-image-5.11.0-38-generic but it is not going to be installed or
linux-image-unsigned-5.11.0-38-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

My kernel:


$ uname -r
5.11.0-37-generic

Can I install 5.11.0-38 somehow? Or downgrade these packages so that they will be compatible with 5.11.0-37?


Edit

The answers are correct and working. I had to turn off my antivirus first in order for them to work.


More From » apt

 Answers
0

I found the solution (specific for your issue)


 sudo rm -rf /var/cache/apt/archives/linux*

This command removes every file which was causing errors


If this didn't worked


Then


sudo rm -rf /var/lib/dpkg/info/linux-modules-5.11.0-38-generic 
sudo rm -rf /var/lib/dpkg/info/linux-image-generic-hwe-20.04
sudo rm -rf /var/lib/dpkg/info/linux-modules-extra-5.11.0-38-generic
sudo rm -rf /var/lib/dpkg/info/linux-generic-hwe-20.04
sudo apt install linux-modules-5.11.0-38-generic linux-image-generic-hwe-20.04 linux-modules-extra-5.11.0-38-generic linux-generic-hwe-20.04
sudo dpkg --configure -a

Also you should disable your antivirus and then run 'sudo apt --fix-broken install`.


[#1034] Monday, June 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lotceptin

Total Points: 374
Total Questions: 106
Total Answers: 118

Location: The Bahamas
Member since Tue, Apr 27, 2021
3 Years ago
;