I have 6 updates that won't install on Ubuntu 12.04?

I'm an Ubuntu novice, so any help here is greatly appreciated. I'm running 12.04, and I have six updates that just won't install. I've tried Update Manager, sudo apt-get upgrade, and sudo apt-get update. Nothing has worked so far.

Here's my output after sudo apt-get dist-upgrade:

Reading package lists... Done  
Building dependency tree         
Reading state information... Done  
Calculating upgrade... Done  
The following packages will be upgraded:  
  fglrx fglrx-amdcccle fglrx-dev linux-generic-pae  
  linux-image-3.2.0-24-generic-pae linux-image-generic-pae  
6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
11 not fully installed or removed.  
Need to get 0 B/83.0 MB of archives.  
After this operation, 53.1 MB of additional disk space will be used.  
Do you want to continue [Y/n]? y  
Setting up linux-image-3.2.0-24-generic-pae (3.2.0-24.37) ...  
Running depmod.  
sh: 1: /usr/sbin/update-initramfs: not found  
Failed to create initrd image.  
dpkg: error processing linux-image-3.2.0-24-generic-pae (--configure):  
 subprocess installed post-installation script returned error exit status 2  
Setting up linux-image-3.2.0-27-generic-pae (3.2.0-27.43) ...  
Running depmod.  
sh: 1: /usr/sbin/update-initramfs: not found  
Failed to create initrd image.  
dpkg: error processing linux-image-3.2.0-27-generic-pae (--configure):  
 subprocess installed post-installation script returned error exit status 2  
Setting up linux-image-3.2.0-29-generic-pae (3.2.0-29.46) ...  
Running depmod.  
sh: 1: /usr/sbin/update-initramfs: not found  
Failed to create initrd image.  
dpkg: error processing linux-image-3.2.0-29-generic-pae (--configure):  
 subprocess installed post-installation script returned error exit status 2  
Setting up udev (175-0ubuntu9.1) ...  
No apport report written because MaxReports is reached already  
                                                              udev stop/waiting  
udev start/running, process 4840  
/var/lib/dpkg/info/udev.postinst: 87: /var/lib/dpkg/info/udev.postinst: update-  initramfs: not found  
dpkg: error processing udev (--configure):  
 subprocess installed post-installation script returned error exit status 127  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of xserver-xorg-core:  
 xserver-xorg-core depends on udev (>= 149); however:  
  Package udev is not configured yet.  
dpkg: error processing xserver-xorg-core (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of fglrx:  
 fglrx depends on xserver-xorg-core; however:  
  Package xserver-xorg-core is not configured yet.  
dpkg: error processing fglrx (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of fglrx-amdcccle:  
 fglrx-amdcccle depends on fglrx; however:  
  Package fglrx is not configured yet.  
dpkg: error processing fglrx-amdcccle (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of linux-image-generic-pae:  
 linux-image-generic-pae depends on linux-image-3.2.0-24-generic-pae; however:  
  Package linux-image-3.2.0-24-generic-pae is not configured yet.  
dpkg: error processing linux-image-generic-pae (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of linux-generic-pae:  
 linux-generic-pae depends on linux-image-generic-pae (= 3.2.0.24.26); however:  
  Package linux-image-generic-pae is not configured yet.  
dpkg: error processing linux-generic-pae (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of xserver-xorg-video-intel:  
 xserver-xorg-video-intel depends on xorg-video-abi-11; however:  
  Package xorg-video-abi-11 is not installed.  
  Package xserver-xorg-core which provides xorg-video-abi-11 is not configured yet.  
 xserver-xorg-video-intel depends on xserver-xorg-core (>= 2:1.10.99.901); however:  
  Package xserver-xorg-core is not configured yet.  
dpkg: error processing xserver-xorg-video-intel (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              dpkg: dependency problems   prevent configuration of fglrx-dev:  
 fglrx-dev depends on fglrx; however:  
  Package fglrx is not configured yet.  
dpkg: error processing fglrx-dev (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because MaxReports is reached already  
                                                              Errors were encountered   while processing:   
 linux-image-3.2.0-24-generic-pae  
 linux-image-3.2.0-27-generic-pae  
 linux-image-3.2.0-29-generic-pae  
 udev  
 xserver-xorg-core  
 fglrx  
 fglrx-amdcccle  
 linux-image-generic-pae  
 linux-generic-pae  
 xserver-xorg-video-intel  
 fglrx-dev  
E: Sub-process /usr/bin/dpkg returned an error code (1)  

Solution 1:

All the errors says it could not find a file, that is /usr/sbin/update-initramfs

Now I executed the following command to find out which package was expected to provide that file and here is the output

$ dpkg -S /usr/sbin/update-initramfs
initramfs-tools: /usr/sbin/update-initramfs

So would you please try installing package initramfs-tools and re-run the updates. To check if the package already present.

sudo dpkg -l |grep initramfs-tools

Then to install initramfs-tools (if not found)

sudo apt-get install initramfs-tools

Then repeat the install process using sudo apt-get update or other commands.

I am keen to know if this helped you to tide over the problem.

Solution 2:

I had encountered a similar issue with linux-image-3.2.0-35-generic.

sudo apt-get install --reinstall initramfs-tools

seemed to help. At the very least, all of the packages were installed without any errors. As far as I understand (my knowledge is very limited, keep that in mind), at some point /usr/sbin/update-initramfs got deleted for some weird reason. But the package was still marked as installed, so

sudo apt-get install initramfs-tools

didn't change anything.

Solution 3:

Try sudo apt-get dist-upgrade in such cases; that is, when regular upgrade via Update Manager or sudo apt-get update && sudo apt-get upgrade leaves some packages out --- particularly "linux-something" packages (those are kernel updates).