1

I have server running

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial

I'm trying to upgrade system using this commands. current user is not a root.

sudo apt-get update
sudo apt-get upgrade

but it shows me errors like this

linux-image-generic-hwe-16.04 : Depends: linux-image-4.15.0-33-generic but it is not installed Recommends: thermald but it is not installed

linux-modules-extra-4.15.0-30-generic : Depends: linux-image-4.15.0-30-generic but it is not installed or linux-image-unsigned-4.15.0-30-generic but it is not installed

I've tried to install this packages independently but it did not solve my problem

also i've tried to use

sudo apt-get -f install

no solution.

Edited

sudo apt install linux-image-4.15.0-33-generic

Reading package lists... Done
Building dependency tree       
Reading state information... Done

You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:



linux-image-4.15.0-33-generic : Depends: linux-modules-4.15.0-33-generic but it is not going to be installed



linux-image-generic-hwe-16.04 : Depends: linux-image-4.15.0-34-generic but it is not going to be installed


 Recommends: thermald but it is not going to be installed



linux-modules-extra-4.15.0-34-generic : Depends: linux-image-4.15.0-34-generic but it is not going to be installed or
                                                  linux-image-unsigned-4.15.0-34-generic but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I have googled but i could not find the answer, may be i'm searching wrongly.

What i can do now ?

2 Answers2

1

I had similar problems with apt-get upgrade on Ubuntu 10.04. Then I learned that apt-get dist-upgrade is better at dealing with dependencies. I have used apt-get dist-upgrade since then and it has worked for me on 10.04, 12.04, 14.04, and 16.04.

kasperd
  • 29,894
  • 16
  • 72
  • 122
  • Thank you for your answer, unfortunately it did not helped me to solve this issue i've tried `sudo apt-get dist-upgrade` and `sudo apt-get -f dist-upgrade` both of them have same end. – Jano_Bokuchava Sep 12 '18 at 07:45
  • @Jano_Bokuchava What does `dpkg-query -l 'linux-image-generic-*'` say? I don't see any `linux-image-generic-hwe-16.04` on the Ubuntu 16.04 machine where I just tested that command. – kasperd Sep 12 '18 at 07:54
  • this is a result : `Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============================-====================-====================-================================================================== iU linux-image-generic-hwe-16.04 4.15.0.34.56 amd64 Generic Linux kernel image` – Jano_Bokuchava Sep 12 '18 at 07:57
  • i tried `sudo apt-get purge linux-modules-4.15.0-30-generic ` also but nothing same result. – Jano_Bokuchava Sep 12 '18 at 07:59
0

Try aptitude. I have found that it will keep trying for solutions even if you say no to the first one.

aptitude full-upgrade

Removing kernels may make your system not bootable. Be sure to have a backout plan like rebuild the box or boot a rescue environment.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32