0

Whatever I try to do whether installing new software, or if I try sudo apt-get upgrade

I always get error Sometimes this:(when I tried sudo apt-get upgrade)

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-image-generic-hwe-16.04 : Depends: linux-image-4.15.0-47-generic but it is not installed
 linux-modules-extra-4.15.0-43-generic : Depends: linux-image-4.15.0-43-generic but it is not installed or
                                                  linux-image-unsigned-4.15.0-43-generic but it is not installed
 linux-modules-extra-4.15.0-45-generic : Depends: linux-image-4.15.0-45-generic but it is not installed or
                                                  linux-image-unsigned-4.15.0-45-generic but it is not installed
 linux-modules-extra-4.15.0-47-generic : Depends: linux-image-4.15.0-47-generic but it is not installed or
                                                  linux-image-unsigned-4.15.0-47-generic but it is not installed
E: Unmet dependencies. Try using -f.

Sometimes this:(when I tried sudo apt-get purge linux-image-4.15.0-30-generic)

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-image-generic-hwe-16.04 : Depends: linux-image-4.15.0-47-generic but it is not going to be installed
 linux-modules-extra-4.15.0-30-generic : Depends: linux-image-4.15.0-30-generic but it is not going to be installed or
                                                  linux-image-unsigned-4.15.0-30-generic but it is not going to be installed
 linux-modules-extra-4.15.0-43-generic : Depends: linux-image-4.15.0-43-generic but it is not going to be installed or
                                                  linux-image-unsigned-4.15.0-43-generic but it is not going to be installed
 linux-modules-extra-4.15.0-45-generic : Depends: linux-image-4.15.0-45-generic but it is not going to be installed or
                                                  linux-image-unsigned-4.15.0-45-generic but it is not going to be installed
 linux-modules-extra-4.15.0-47-generic : Depends: linux-image-4.15.0-47-generic but it is not going to be installed or
                                                  linux-image-unsigned-4.15.0-47-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

What should I do, it has become very hard to even install new software. I was trying to install R but again failed due to these (probably kernel unmet dependencies)

Output of sudo apt-get -f install:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode intel-microcode iucode-tool libpython-all-dev libsodium18 libvpx3:i386 linux-headers-4.15.0-32 linux-headers-4.15.0-32-generic
  linux-headers-4.15.0-33 linux-headers-4.15.0-33-generic linux-headers-4.15.0-34 linux-headers-4.15.0-34-generic linux-headers-4.15.0-43
  linux-headers-4.15.0-43-generic linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic linux-headers-4.15.0-47
  linux-headers-4.15.0-47-generic linux-headers-generic-hwe-16.04 linux-image-4.15.0-30-generic linux-image-4.15.0-32-generic
  linux-image-4.15.0-33-generic linux-image-4.15.0-34-generic linux-modules-4.15.0-30-generic linux-modules-4.15.0-32-generic
  linux-modules-4.15.0-33-generic linux-modules-4.15.0-34-generic linux-modules-extra-4.15.0-30-generic linux-modules-extra-4.15.0-32-generic
  linux-modules-extra-4.15.0-33-generic linux-modules-extra-4.15.0-34-generic python-all python-all-dev python-pip python-pip-whl python-wheel
  qtdeclarative5-controls-plugin qtdeclarative5-dialogs-plugin thermald
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 330 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.157.21) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-39-generic
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.15.0-39-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-39-generic
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.15.0-39-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-firmware
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • It tells you to run sudo apt-get -f install. Have you? – mikewhatever Apr 13 '19 at 08:07
  • yes I tried, it doesn't help.By the way I have also edited the question and added output of the command you mentioned – Nimish Bansal Apr 13 '19 at 08:16
  • 1
    Just a comment... Always use sudo apt update before installing new software or sudo apt upgrade. Also those missing firmware warnings are distracting and will be around for awhile unless you follow these instructions: https://askubuntu.com/questions/832524/updated-kernel-to-4-8-now-missing-firmware-warnings – WinEunuuchs2Unix Apr 14 '19 at 00:15

1 Answers1

0

The output suggests that you don't have enough space on your disk. . . Is this true? These commands require disk area, even if they will result in no additional disk usage after the command cleanup. . . I'd also do the "auto remove" which was suggested to get rid of your unneeded packages. . .

kakunka
  • 59