1

I have just upgrade my desktop from ubuntu 14.04 LTS to 16.04 LTS. I have had the same situation as described here Kernel did not upgrade between 14.04 LTS to 16.04 LTS and Why is apt no longer updating the kernel? but none of the solutions have worked for me.

When doing sudo apt-get install linux I get

dev:~$sudo apt-get install linux
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux

and when doing sudo apt install linux-generic I get

dev:~$sudo apt install linux-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-generic : Depends: linux-headers-generic (= 4.4.0.66.70) but 4.4.0.67.72 is to be installed
E: Unable to correct problems, you have held broken packages.

cat /etc/os-release

dev:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Installed images are (it is very long but at the end shows):

dpkg -l | grep linux-image

 linux-image-extra-3.13.0-113-generic                 3.13.0-113.160                                amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc  
 linux-image-extra-4.4.0-67-generic                   4.4.0-67.88                                   amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

and also this:

dev:~$ uname -r
3.13.0-113-generic

I have not installed any kernel by myself but I understand that I have probably done something.

How can I resolve this situation?

EDIT

dev:~/temp$ apt-cache policy linux-headers-generic
linux-headers-generic:
  Installed: 4.4.0.67.72
  Candidate: 4.4.0.67.72
  Version table:
 *** 4.4.0.67.72 100
        100 /var/lib/dpkg/status
     4.4.0.66.70 500
        500 http://se.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     4.4.0.21.22 500
        500 http://se.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

EDIT 2

The answer provided by fkraiem was the solution to my questions but I also upgrade the kernel with the help of the answer by user535733. Thanks guys!

  • Please add the output of apt-cache policy linux-headers-generic. – fkraiem Mar 27 '17 at 13:07
1

For an unknown reason, you have version 4.4.0.67.72 of linux-headers-generic installed on your system, however the latest version on the official Ubuntu 16.04 repositories is 4.4.0.66.70.

When you try to install the latest kernel from the repositories, which is also version 4.4.0.66.70, it requires the corresponding version of the headers. However, since you already have a higher version, the installation fails because Apt never automatically downgrades a package.

The solution, hence, is to manually install the correct version of the headers, with sudo apt install linux-headers-generic=4.4.0.66.70 (Apt will warn you about the downgrade, but will proceed when you confirm it).

1

You should install Ukuu (Ubuntu Kernel Upgrade Utility). This will make it very easy to install and remove kernels.

sudo apt-add-repository -y ppa:teejee2008/ppa

Then:

sudo apt-get update

Install Ukuu:

sudo apt-get install ukuu

After it installs, open it up (type in "ukuu" in Terminal). After it refreshes the list, select the newest STABLE kernel (the kernel versions with the red icons are unstable). As of this post, the latest stable version would be 4.10.6. Select it and click "install". Wait for the install, when it finishes there will be a window warning you about the newer kernel. Don't worry about it.

Reboot your computer, and the kernel will be updated.

1

Seems like you broke your system when you added the -proposed repository, and then you skipped a bunch of upgrades.

The clues:

  • kernel 4.4.0.72 was in -proposed, since removed.
  • The linux-image-generic metapackage is pointing to a removed kernel image.

How to repair:

  1. Disable the -proposed repository. -proposed is intended for testing, and breakage is likely. You're not a tester...else you would already know how to fix this simple problem. We don't know which method you used to enable -proposed, so undoing it is up to you.

  2. Since you changed your sources, update your database of available packages: sudo apt update

  3. Delete the old metapackage from your local cache, so it doesn't get re-installed: sudo apt clean linux-image-generic

  4. Download and install a fresh metapackage that points to the current kernel image: sudo apt install --reinstall linux-image-generic

  5. Finally, test your package manager for proper function. sudo apt upgrade. There should be no errors.

  6. [OPTIONAL] Since you probably added other packages from -proposed, list those packages using apt list --installed | grep -v xenial. If any give you problems, revert them to the -updates or -security versions.

  • Thanks. I upgrade my system with the help of your suggestions. I resolved the conflicts with the help of the answer from fkraiem. – user1329339 Mar 27 '17 at 14:24
  • Removing proposed is certainly a good idea; but don't forget to revert any proposed-package installed to their original version. You can get them with apt list --installed | grep -v xenial (after sudo apt update). – fkraiem Mar 27 '17 at 14:29
  • @fkraiem thanks for the input - edited the answer. – user535733 Mar 27 '17 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.