[Last Call] Learn how to a build a cloud-first strategyRegister Now


Ubuntu server 12.04 will not install packages

Posted on 2014-08-29
Medium Priority
Last Modified: 2016-05-23
My problem started with a failed kernel update because the /boot partition was full. I have followed the many suggestions in google searches, most lately ran the following:

sudo apt-get clean
sudo apt-get update
sudo apt-get -f install

89 packages all failed. Webmin package updater produces the following snippet:

Building complete list of updates ..

Now updating apache2 ..

    Installing package(s) with command apt-get -y install apache2 ..

    dpkg: dependency problems prevent configuration of linux-generic:
     linux-generic depends on linux-image-generic (=; however:
      Version of linux-image-generic on system is
     linux-generic depends on linux-headers-generic (=; however:
      Version of linux-headers-generic on system is
    dpkg: error processing linux-generic (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
    Reading package lists...
    Building dependency tree...
    Reading state information...
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     apache2 : Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1.7) but it is not going to be installed or
                        apache2-mpm-prefork (= 2.2.22-1ubuntu1.7) but 2.2.22-1ubuntu1.5 is to be installed or
                        apache2-mpm-event (= 2.2.22-1ubuntu1.7) but it is not going to be installed or
                        apache2-mpm-itk (= 2.2.22-1ubuntu1.7) but it is not going to be installed
               Depends: apache2.2-common (= 2.2.22-1ubuntu1.7) but 2.2.22-1ubuntu1.5 is to be installed
     linux-generic : Depends: linux-image-generic (= but is to be installed
                     Depends: linux-headers-generic (= but is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

    .. install failed!
Question by:RayRider
  • 6
  • 2
LVL 36

Expert Comment

by:Seth Simmons
ID: 40294071
...because the /boot partition was full

how big did you make it?

Expert Comment

ID: 40294115
Manually remove the old kernel which is not required..
 And try updating the kernel and install the packages.

Author Comment

ID: 40294732
Seth Simmons:
It was the size that was created from the install: 234295 1K blocks, used 189818 1K blocks, now 14% free.

Please give me some details on manually removing the old kernels.
How do I update the kernel and install the packages?
What do I delete from the /boot directory?

uname -a
linux greece 3.2.0-67-generic #101-ubuntu SMP Tue Jul 15 17:46:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Below is the directory list for /boot:

rrider@greece:/boot$ ls -al
total 185764
drwxr-xr-x  4 root root     3072 Aug 29 18:58 .
drwxr-xr-x 23 root root     4096 Aug 29 18:58 ..
-rw-r--r--  1 root root   795751 Dec  3  2013 abi-3.2.0-58-generic
-rw-r--r--  1 root root   795743 Feb 18  2014 abi-3.2.0-60-generic
-rw-r--r--  1 root root   795743 May  2 17:17 abi-3.2.0-61-generic
-rw-r--r--  1 root root   795911 May 15 18:44 abi-3.2.0-63-generic
-rw-r--r--  1 root root   795911 Jun  4 17:30 abi-3.2.0-64-generic
-rw-r--r--  1 root root   795911 Jun 11 15:52 abi-3.2.0-65-generic
-rw-r--r--  1 root root   795963 Jul 15 13:11 abi-3.2.0-67-generic
-rw-r--r--  1 root root   795963 Aug 12 17:27 abi-3.2.0-68-generic
-rw-r--r--  1 root root   140629 Dec  3  2013 config-3.2.0-58-generic
-rw-r--r--  1 root root   140612 Feb 18  2014 config-3.2.0-60-generic
-rw-r--r--  1 root root   140612 May  2 17:17 config-3.2.0-61-generic
-rw-r--r--  1 root root   140640 May 15 18:44 config-3.2.0-63-generic
-rw-r--r--  1 root root   140640 Jun  4 17:30 config-3.2.0-64-generic
-rw-r--r--  1 root root   140640 Jun 11 15:52 config-3.2.0-65-generic
-rw-r--r--  1 root root   140641 Jul 15 13:11 config-3.2.0-67-generic
-rw-r--r--  1 root root   140675 Aug 12 17:27 config-3.2.0-68-generic
drwxr-xr-x  3 root root     5120 Aug 29 18:58 grub
-rw-r--r--  1 root root 14815201 Feb  6  2014 initrd.img-3.2.0-58-generic
-rw-r--r--  1 root root 14816583 Apr 23 06:35 initrd.img-3.2.0-60-generic
-rw-r--r--  1 root root 14816455 May  6 06:46 initrd.img-3.2.0-61-generic
-rw-r--r--  1 root root 14817596 May 26 06:53 initrd.img-3.2.0-63-generic
-rw-r--r--  1 root root 14817743 Jun  6 06:51 initrd.img-3.2.0-64-generic
-rw-r--r--  1 root root 14801206 Aug 10 16:48 initrd.img-3.2.0-65-generic
-rw-r--r--  1 root root 14800933 Aug 10 16:48 initrd.img-3.2.0-67-generic
-rw-r--r--  1 root root 14801302 Aug 29 18:58 initrd.img-3.2.0-68-generic
drwxr-xr-x  2 root root    12288 Jul  7  2012 lost+found
-rw-r--r--  1 root root   176764 Nov 27  2011 memtest86+.bin
-rw-r--r--  1 root root   178944 Nov 27  2011 memtest86+_multiboot.bin
-rw-------  1 root root  2895308 Dec  3  2013 System.map-3.2.0-58-generic
-rw-------  1 root root  2895229 Feb 18  2014 System.map-3.2.0-60-generic
-rw-------  1 root root  2895229 May  2 17:17 System.map-3.2.0-61-generic
-rw-------  1 root root  2896164 May 15 18:44 System.map-3.2.0-63-generic
-rw-------  1 root root  2896724 Jun  4 17:30 System.map-3.2.0-64-generic
-rw-------  1 root root  2896866 Jun 11 15:52 System.map-3.2.0-65-generic
-rw-------  1 root root  2896997 Jul 15 13:11 System.map-3.2.0-67-generic
-rw-------  1 root root  2897193 Aug 12 17:27 System.map-3.2.0-68-generic
-rw-------  1 root root  4983216 Dec  3  2013 vmlinuz-3.2.0-58-generic
-rw-------  1 root root  4981616 Feb 18  2014 vmlinuz-3.2.0-60-generic
-rw-------  1 root root  4982576 May  2 17:17 vmlinuz-3.2.0-61-generic
-rw-------  1 root root  4985488 May 15 18:44 vmlinuz-3.2.0-63-generic
-rw-------  1 root root  4986832 Jun  4 17:30 vmlinuz-3.2.0-64-generic
-rw-------  1 root root  4986992 Jun 11 15:52 vmlinuz-3.2.0-65-generic
-rw-------  1 root root  4986960 Jul 15 13:11 vmlinuz-3.2.0-67-generic
-rw-------  1 root root  4988144 Aug 12 17:27 vmlinuz-3.2.0-68-generic
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.


Author Comment

ID: 40294790
Another comment from looking at the update failure messages that are saying something to the effect of problems with dependencies. It is saying that the update depends on linux-image-generic (=; however, version of linux-image-generic on system is And, the same basic message with "headers".

All of the 89 updates it is trying to do are depending on and I have installed.

The question is how to make the update process stop asking WEBMIN to update all these packages on a system that is on a higher level of the kernel? I need to get that issue synced up somehow.

Author Comment

ID: 40307847
My question has been abandoned by everyone. Is there anyone available to assist me in solving this problem. There once was somewhere on Experts Exchange a method to request an adviser to elevate the problem, or to maybe include another category. There once was a system message that told me my question was "stagnant", and some advice on what to do, or just close it.

Author Comment

ID: 41602425
I've requested that this question be deleted for the following reason:

Answer found on Google
LVL 36

Expert Comment

by:Seth Simmons
ID: 41602426
so explain what the answer is and select that

Accepted Solution

RayRider earned 0 total points
ID: 41602444
To satisfy any questions about this post and the reason I wish to delete it, The below steps are what I found to solve my issue when /boot is too full to allow updates:

NOTE: this is only if you can't use apt to clean up due to a 100% full /boot
If apt-get isn't functioning because your /boot is at 100%, you'll need to clean out /boot first. This likely has caught a kernel upgrade in a partial install which means apt has pretty much froze up entirely and will keep telling you to run apt-get -f install even though that command keeps failing.
Get the list of kernel images and determine what you can do without: sudo dpkg --list 'linux-image*' The one current running kernel versiot can be found with: uname -r. Note the two newest versions in the list and the one in use.
Craft a command to delete all files in /boot for kernels that don't matter to you using brace expansion to keep you sane. Remember to exclude the current and two newest kernel images. Example: sudo rm -rf /boot/*-3.2.0-{23,45,49,51,52,53,54,55}-*.
sudo apt-get -f install to clean up what's making apt grumpy about a partial install.
If you run into an error that includes a line like "Internal Error: Could not find image (/boot/vmlinuz-3.2.0-56-generic)", then run the command: sudo apt-get purge linux-image-3.2.0-56-generic (with your appropriate version).
Finally: sudo apt-get autoremove to clear out the old kernel image packages that have been orphaned by the manual boot clean.
Suggestion, run: sudo apt-get update and sudo apt-get upgrade to take care of any upgrades that may have backed up while waiting for you to discover the full /boot partition.
Suggestion2, Review https://help.ubuntu.com/community/AutomaticSecurityUpdates and consider setting Unattended-Upgrade::Remove-Unused-Dependencies to true in /etc/apt/apt.conf.d/50unattended-upgrades. This will be the equivalent of running autoremove after each security updates to be sure you clean out unused kernels but will also remove other things it thinks are unused saving you from this problem in the future.

Author Closing Comment

ID: 41610804
I found it from other sources

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question