Ubuntu – When installing updates or from software center in Ubuntu 12.04, error messages

aptinstallationupdates

I have a new computer with plenty of disk space. There's a solid state boot drive and a regular disk where I put my files.

So the primary thing happening is that for the last few weeks, whenever I try to install updates or download from the software center, I get for updates this, and for software this.

Does anybody have any clue what's going on regarding the problem?

I did change some settings on the display with My Unity recently, and I also a few weeks ago finally figured out how to access the big hard drive by doing sudo chown user /mnt/data0. I had also disabled global menus. Could that be causing the problem. Incidentally, I've also been having some problems with the video card not saving my settings, so I have to reset them each time I turn on the computer, even though they WERE saved for the first few weeks.

$ sudo dpkg --configure -a 

Setting up initramfs-tools (0.99ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-3.2.0-39-generic (3.2.0-39.62) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-39-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.2.0-39-generic /boot/vmlinuz-3.2.0-39-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-39-generic /boot/vmlinuz-3.2.0-39-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-39-generic /boot/vmlinuz-3.2.0-39-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-39-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-39-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-39-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-39-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.2.0-39-generic; however:
  Package linux-image-3.2.0-39-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.39.47); however:
  Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-38-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-38-generic with 1.
dpkg: error processing initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.2.0-39-generic
 linux-image-generic
 linux-generic
 initramfs-tools

At this point we got a popup that said:

Low Disk Space
The volume "boot" has only 0 bytes disk space remaining.  You can free up disk space by removing unused programs or files, or by moving files to another disk or partition.

This doesn't really make sense to us. We're having something of a hard time figuring out which drive we're looking at when we look in the file system, but when we look at the drive bookmarked / which we thought was the solid state drive and then go into boot we see not very many files that are not very big – certainly not 120 gigs worth.

About the drives: When we bought the computer about a month ago, we had the company install Ubuntu. They made the 120 gigabyte solid state drive the boot drive as per our request. The 3 T drive seemed to be mounted, but the folks who installed Ubuntu did not make the 3 Terabyte drive visible to us and we were denied permissions to view it until I used the fix I mentioned in my original message above so as to be able to save to the drive. (I still seem to be denied permission to view the "Lost and Found" folder though.) Then I copied the files I'd saved on the solid state drive to the 3 T drive and deleted the files I'd saved from the solid state drive to free up room. The solid state drive still has lots of room on it (as of course does the other one).

From what we can tell, the software and updates that get error messages seem to actually be getting installed (I don't know if correctly) but generate long error messages each time. Is it trying to install to both disks or something like that and generating an error message because the 3 T drive wasn't installed/mounted correctly?

So sorry for any ignorance we're showing. I'm trying to learn all this, but still don't really understand the file system very well and certainly am an Ubuntu newbie.

UPDATE April 12, 2013: Hi, Nikki. Thanks so much for trying to help us. Well, we finally were able to try to implement the steps and it failed. We got the following (I had to delete some of it to make it fit in this message):

user@ubuntu:~$ sudo apt-get clean && sudo apt-get autoremove
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-generic : Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is installed
E: Unmet dependencies. Try using -f.
user@ubuntu:~$ uname -r
3.2.0-38-generic
user@ubuntu:~$ dpkg --list | grep linux-image
ii  linux-image-3.2.0-29-generic           3.2.0-29.46                             Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-37-generic           3.2.0-37.58                             Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-38-generic           3.2.0-38.61                             Linux kernel image for version 3.2.0 on 64 bit x86 SMP
iF  linux-image-3.2.0-39-generic           3.2.0-39.62                             Linux kernel image for version 3.2.0 on 64 bit x86 SMP
iF  linux-image-3.2.0-40-generic           3.2.0-40.64                             Linux kernel image for version 3.2.0 on 64 bit x86 SMP
iU  linux-image-generic                    3.2.0.39.47                             Generic Linux kernel image
user@ubuntu:~$ sudo apt-get purge linux-image-3.2.0.29-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'linux-image-3.2.0-29-generic' for regex 'linux-image-3.2.0.29-generic'
Note, selecting 'linux-image-3.2.0-29-generic-pae' for regex 'linux-image-3.2.0.29-generic'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-generic : Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user@ubuntu:~$ sudo apt-get purge linux-image-3.2.0.37-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'linux-image-3.2.0-37-generic' for regex 'linux-image-3.2.0.37-generic'
Note, selecting 'linux-image-3.2.0-37-generic-pae' for regex 'linux-image-3.2.0.37-generic'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-generic : Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user@ubuntu:~$ sudo apt-get purge linux-image-3.2.0.39-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'linux-image-3.2.0-39-generic' for regex 'linux-image-3.2.0.39-generic'
Note, selecting 'linux-image-3.2.0-39-generic-pae' for regex 'linux-image-3.2.0.39-generic'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-generic : Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is to be installed
 linux-image-generic : Depends: linux-image-3.2.0-39-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user@ubuntu:~$ sudo apt-get purge linux-image-3.2.0.40-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'linux-image-3.2.0-40-generic' for regex 'linux-image-3.2.0.40-generic'
Note, selecting 'linux-image-3.2.0-40-generic-pae' for regex 'linux-image-3.2.0.40-generic'
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-generic : Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user@ubuntu:~$ sudo apt-get purge linux-image-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-generic : Depends: linux-image-generic (= 3.2.0.39.47) but it is not going to be installed
                 Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user@ubuntu:~$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-40-generic
Found linux image: /boot/vmlinuz-3.2.0-39-generic
Found linux image: /boot/vmlinuz-3.2.0-38-generic
Found initrd image: /boot/initrd.img-3.2.0-38-generic
Found linux image: /boot/vmlinuz-3.2.0-37-generic
Found initrd image: /boot/initrd.img-3.2.0-37-generic
Found linux image: /boot/vmlinuz-3.2.0-29-generic
Found initrd image: /boot/initrd.img-3.2.0-29-generic
done
user@ubuntu:~$ sudo dpkg --configure -a
Setting up initramfs-tools (0.99ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-3.2.0-40-generic (3.2.0-40.64) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-39-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.2.0-40-generic /boot/vmlinuz-3.2.0-40-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-40-generic /boot/vmlinuz-3.2.0-40-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-40-generic /boot/vmlinuz-3.2.0-40-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-40-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-40-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-40-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-40-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-headers-generic (= 3.2.0.39.47); however:
  Version of linux-headers-generic on system is 3.2.0.40.48.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-3.2.0-39-generic (3.2.0-39.62) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-40-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.2.0-39-generic /boot/vmlinuz-3.2.0-39-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-39-generic /boot/vmlinuz-3.2.0-39-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-39-generic /boot/vmlinuz-3.2.0-39-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-39-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-39-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-39-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-39-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.2.0-39-generic; however:
  Package linux-image-3.2.0-39-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-38-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-38-generic with 1.
dpkg: error processing initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.2.0-40-generic
 linux-generic
 linux-image-3.2.0-39-generic
 linux-image-generic
 initramfs-tools
user@ubuntu:~$ 

NIKKI: OUTPUT of DF COMMAND AND YOUR LAST COMMAND:

user@ubuntu:~$ df
Filesystem      1K-blocks      Used  Available Use% Mounted on
/dev/sda2        19222656   5545404   12700716  31% /
devtmpfs         16425020         8   16425012   1% /dev
none              3291972       996    3290976   1% /run
none                 5120         0       5120   0% /run/lock
none             16459852       736   16459116   1% /run/shm
/dev/sda1           90195     89356          0 100% /boot
/dev/sda5        88370448  33795068   50086420  41% /home
/dev/sdb1      2884283608 184345072 2553425284   7% /mnt/data0
/dev/sdc1       488145616 404062976   84082640  83% /media/KAREN_~1DRI
user@ubuntu:~$ dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
[sudo] password for user: 
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-generic : Depends: linux-headers-generic (= 3.2.0.39.47) but 3.2.0.40.48 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Best Answer

In your pastebin I noticed that it says

Package linux-image-generic is not configured yet.

try doing this and then upgrade

sudo dpkg --configure -a

sudo apt-get install -f

sudo apt-get update && sudo apt-get upgrade

Continue:

Seems like you ran out of space. Have you tried running

sudo apt-get clean && sudo apt-get autoremove

Then I would suggest you check which kernel you are running now by executing

uname -r

remember it and then check all kernels you have installed

dpkg --list | grep linux-image 

then remove all other kernels EXCEPT the one you are running right now.

sudo apt-get purge linux-image-x.x.x.x-generic

and after you have deleted all run

sudo update-grub2 

And last but not least repeat the step above with Configuring the kernel

UPDATE 4/13/2013

Hi again, no worries, there are still plenty of ways we can try to fix this. Can you give me the output of the df command from terminal as well? Also try running this command in terminal and see if it is able to delete "unneeded kernels"

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge