I am using Ubuntu 12.04.2 LTS (“precise”). I am trying to upgrade all packages using kernel via apt-get upgrade method. But, I am getting the following message:

apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages have been kept back:
linux-headers-virtual linux-image-virtual mysql-client-5.5 mysql-server-5.5

The following packages will be upgraded:
base-files dosfstools linux-libc-dev linux-libc-dev:i386
4 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 1,847 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue [Y/n]?

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements None
Est. reading time 1m
How do I fix this issue and install linux-headers-virtual linux-image-virtual packages which have been kept back in Ubuntu Linux LTS version 12.04.2?

If you are running virtual or cloud images, there is no need to get newer enablement stacks and are thus recommended to remain on the original Precise stack. You only need the newer kernel when
  1. You need to support a wider variety of hardware on an existing LTS release, the 12.04.2 and newer point releases will ship with an updated kernel and X stack by default.
  2. These newer hardware enablement stacks will be comprised of the newer kernel and X stacks from 12.10 (Quantal), 13.04 (Raring), 13.10 (Saucy), and 14.04 (T name TBD).
  3. These enablement stacks are only intended for use on x86 hardware at this time.

If you really want to upgrade virtual/cloud images, try:
$ sudo apt-get dist-upgrade
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  libterm-readkey-perl linux-headers-3.2.0-52 linux-headers-3.2.0-52-virtual
The following packages will be upgraded:
  base-files dosfstools linux-headers-virtual linux-image-virtual
  linux-libc-dev linux-libc-dev:i386 mysql-client-5.5 mysql-server-5.5
9 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.2 MB of archives.
After this operation, 102 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-3.2.0-52-virtual
Found kernel: /vmlinuz-3.2.0-31-virtual
Found kernel: /memtest86+.bin
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

Setting up libterm-readkey-perl (2.30-4build3) ...
Setting up mysql-client-5.5 (5.5.32-0ubuntu0.12.04.1) ...
Setting up mysql-server-core-5.5 (5.5.32-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.32-0ubuntu0.12.04.1) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
mysql start/running, process 1013
Setting up dosfstools (3.0.12-1ubuntu1.1) ...
Setting up linux-headers-3.2.0-52 (3.2.0-52.78) ...
Setting up linux-headers-3.2.0-52-virtual (3.2.0-52.78) ...
Setting up linux-headers-virtual ( ...
Setting up linux-image-virtual ( ...

You need to reboot the Ubuntu based system, enter:
# reboot

See See LTS 12.04 support and upgrade policy for more information.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 2 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Jeffrey Aug 29, 2013 @ 19:55

    Since kernels and MySQL in this case are core system packages and can seriously damage your system if the upgrade fails, this cannot be done with just “upgrade”, one should issue “dist-upgrade” to upgrade these kind of packages.

  • Yaron Shahrabani Sep 17, 2013 @ 22:52

    You better try working with Aptitude in this case, it solves dependency problems and cases like this.
    Tell us if it worked eventually.
    Good luck!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum