3

Whenever I try to install anything I get the following message:

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:
 clang : Depends: clang-3.4 (>= 3.4~rc3-1~) but it is not going to be installed
 linux-image-extra-3.16.0-52-generic : Depends: linux-image-3.16.0-52-generic but it is not going to be installed
 linux-image-extra-3.16.0-57-generic : Depends: linux-image-3.16.0-57-generic but it is not going to be installed
 linux-image-generic-lts-utopic : Depends: linux-image-3.16.0-57-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

However, when I run sudo apt-get -f install, I get this

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  erlang-asn1 erlang-base erlang-corba erlang-crypto erlang-diameter
  erlang-edoc erlang-eldap erlang-erl-docgen erlang-eunit erlang-ic
  erlang-inets erlang-mnesia erlang-nox erlang-odbc erlang-os-mon
  erlang-parsetools erlang-percept erlang-public-key erlang-runtime-tools
  erlang-snmp erlang-ssh erlang-ssl erlang-syntax-tools erlang-tools
  erlang-webtool erlang-xmerl libsctp1 linux-headers-3.16.0-30
  linux-headers-3.16.0-30-generic linux-headers-3.16.0-41
  linux-headers-3.16.0-41-generic linux-headers-3.16.0-43
  linux-headers-3.16.0-43-generic linux-headers-3.16.0-45
  linux-headers-3.16.0-45-generic linux-headers-3.16.0-48
  linux-headers-3.16.0-48-generic linux-headers-3.16.0-51
  linux-headers-3.16.0-51-generic linux-headers-3.16.0-52
  linux-headers-3.16.0-52-generic linux-image-3.16.0-30-generic
  linux-image-3.16.0-41-generic linux-image-3.16.0-43-generic
  linux-image-3.16.0-45-generic linux-image-3.16.0-48-generic
  linux-image-3.16.0-51-generic linux-image-3.16.0-52-generic
  linux-image-extra-3.16.0-30-generic linux-image-extra-3.16.0-41-generic
  linux-image-extra-3.16.0-43-generic linux-image-extra-3.16.0-45-generic
  linux-image-extra-3.16.0-48-generic linux-image-extra-3.16.0-51-generic
  linux-image-extra-3.16.0-52-generic lksctp-tools
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-3.16.0-52-generic linux-image-3.16.0-57-generic
Suggested packages:
  fdutils linux-lts-utopic-tools
The following NEW packages will be installed:
  linux-image-3.16.0-52-generic linux-image-3.16.0-57-generic
0 upgraded, 2 newly installed, 0 to remove and 295 not upgraded.
10 not fully installed or removed.
Need to get 0 B/32.4 MB of archives.
After this operation, 90.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 478639 files and directories currently installed.)
Preparing to unpack .../linux-image-3.16.0-57-generic_3.16.0-57.77~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-57-generic (3.16.0-57.77~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-57-generic_3.16.0-57.77~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/abi-3.16.0-57-generic' to '/boot/abi-3.16.0-57-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-57-generic /boot/vmlinuz-3.16.0-57-generic
Preparing to unpack .../linux-image-3.16.0-52-generic_3.16.0-52.71~14.04.1_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-52-generic (3.16.0-52.71~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-52-generic_3.16.0-52.71~14.04.1_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.16.0-52-generic' to '/boot/vmlinuz-3.16.0-52-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-52-generic /boot/vmlinuz-3.16.0-52-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-52-generic /boot/vmlinuz-3.16.0-52-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.16.0-57-generic_3.16.0-57.77~14.04.1_amd64.deb
 /var/cache/apt/archives/linux-image-3.16.0-52-generic_3.16.0-52.71~14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

My boot partition is almost full (98,7%), and it has quite a few images, but I can't remove them because I get the same message then.

~$ ls /boot
abi-3.16.0-30-generic         initrd.img-3.16.0-46-generic
abi-3.16.0-41-generic         lost+found
abi-3.16.0-43-generic         memtest86+.bin
abi-3.16.0-45-generic         memtest86+.elf
abi-3.16.0-46-generic         memtest86+_multiboot.bin
abi-3.16.0-48-generic         System.map-3.16.0-30-generic
abi-3.16.0-49-generic         System.map-3.16.0-41-generic
abi-3.16.0-51-generic         System.map-3.16.0-43-generic
config-3.16.0-30-generic      System.map-3.16.0-45-generic
config-3.16.0-41-generic      System.map-3.16.0-46-generic
config-3.16.0-43-generic      System.map-3.16.0-48-generic
config-3.16.0-45-generic      System.map-3.16.0-49-generic
config-3.16.0-46-generic      System.map-3.16.0-51-generic
config-3.16.0-48-generic      vmlinuz-3.16.0-30-generic
config-3.16.0-49-generic      vmlinuz-3.16.0-41-generic
config-3.16.0-51-generic      vmlinuz-3.16.0-43-generic
grub                          vmlinuz-3.16.0-45-generic
initrd.img-3.16.0-30-generic  vmlinuz-3.16.0-46-generic
initrd.img-3.16.0-41-generic  vmlinuz-3.16.0-48-generic
initrd.img-3.16.0-43-generic  vmlinuz-3.16.0-49-generic
initrd.img-3.16.0-45-generic  vmlinuz-3.16.0-51-generic
6
  • Try removing old kernels to free up some room help.ubuntu.com/community/Lubuntu/Documentation/… Jan 10 '16 at 16:13
  • I get the same dependency errors when using either apt-get or dpkg for removing those old kernels
    – Dirk
    Jan 10 '16 at 16:21
  • 1
    Possible duplicate of How do I free up more space in /boot? Jan 10 '16 at 16:23
  • I tried the solution in that post but dpkg and apt-get wont work
    – Dirk
    Jan 10 '16 at 16:42
  • Seriously, always use Ubuntu's default partition scheme. Simply don't have any separate partitions, put everything in a single one and be happy. Remove your old kernels and consider increasing /boot's size OR merging it with /. Jan 10 '16 at 17:10
0

When using a separate boot partition, after a number of upgrades you will have to remove the old kernel images.

Try:

sudo apt-get remove clang
sudo apt-get autoremove
sudo apt-get remove linux-image-3.16.0-30-generic linux-image-3.16.0-41-generic linux-image-3.16.0-43-generic linux-image-3.16.0-45-generic linux-image-3.16.0-46-generic linux-3.16.0-48-generic
sudo apt-get -f install
sudo apt-get install clang

Alternatively, you can delete some of the older files on the boot partition, though you will get a few errors before it is straightened out.

For Example:

sudo rm -f /boot/*-3.16.0-30-*  /boot/*-3.16.0-41-* /boot/*-3.16.0-43-* /boot/*-3.16.0-45-* /boot/*-3.16.0-46-* /boot/*-3.16.0-48-*
sudo apt-get -f install
sudo apt-get remove linux-image-3.16.0-30-generic linux-image-3.16.0-41-generic linux-image-3.16.0-43-generic linux-image-3.16.0-45-generic linux-image-3.16.0-46-generic linux-3.16.0-48-generic
sudo apt-get -f install
sudo apt-get autoremove
sudo apt-get install clang

Good luck.

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.