0

I'm unable to install a new package via ssh.

sudo apt-get install default-jdk

gives the following error:

You might want to run 'apt-get -f install' to correct these:  
The following packages have unmet dependencies:  
 default-jdk : Depends: default-jre (= 2:1.8-56ubuntu2) but it is not going to be installed  
               Depends: default-jdk-headless (= 2:1.8-56ubuntu2) but it is not going to be installed  
               Depends: openjdk-8-jdk but it is not going to be installed  
 linux-image-extra-4.4.0-79-generic : Depends: linux-image-4.4.0-79-generic but it is not going to be installed  
 linux-image-generic : Depends: linux-image-4.4.0-79-generic but it is not going to be installed  
                       Recommends: thermald but it is not going to be installed  
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).  

When I try the suggested sudo apt-get -f install, there are are more errors displayed:

The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers-4.4.0-43
  linux-headers-4.4.0-43-generic linux-headers-4.4.0-45
  linux-headers-4.4.0-45-generic linux-headers-4.4.0-47
  linux-headers-4.4.0-47-generic linux-headers-4.4.0-51
  linux-headers-4.4.0-51-generic linux-headers-4.4.0-53
  linux-headers-4.4.0-53-generic linux-headers-4.4.0-57
  linux-headers-4.4.0-57-generic linux-headers-4.4.0-59
  linux-headers-4.4.0-59-generic linux-image-4.4.0-31-generic
  linux-image-4.4.0-43-generic linux-image-4.4.0-45-generic
  linux-image-4.4.0-47-generic linux-image-4.4.0-51-generic
  linux-image-4.4.0-53-generic linux-image-4.4.0-57-generic
  linux-image-4.4.0-59-generic linux-image-extra-4.4.0-31-generic
  linux-image-extra-4.4.0-43-generic linux-image-extra-4.4.0-45-generic
  linux-image-extra-4.4.0-47-generic linux-image-extra-4.4.0-51-generic
  linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic
  linux-image-extra-4.4.0-59-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-4.4.0-79-generic
Suggested packages:
  fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following NEW packages will be installed:
  linux-image-4.4.0-79-generic
0 upgraded, 1 newly installed, 0 to remove and 167 not upgraded.
14 not fully installed or removed.
Need to get 0 B/21.9 MB of archives.
After this operation, 66.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 444493 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-79-generic_4.4.0-79.100_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-79-generic (4.4.0-79.100) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-79-generic_4.4.0-79.100_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-79-generic' to '/boot/vmlinuz-4.4.0-79-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 4.4.0-79-generic /boot/vmlinuz-4.4.0-79-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-79-generic /boot/vmlinuz-4.4.0-79-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-79-generic_4.4.0-79.100_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What could I do to repair the installation ? And what could be the original problem ? Thanks for any suggestion.

Edit: The boot partition must be full df -h gives

Filesystem                           Size  Used Avail Use% Mounted on
udev                                 1.8G     0  1.8G   0% /dev
tmpfs                                370M  5.6M  364M   2% /run
/dev/mapper/server--samuel--vg-root  1.8T  8.9G  1.7T   1% /
tmpfs                                1.9G     0  1.9G   0% /dev/shm
tmpfs                                5.0M     0  5.0M   0% /run/lock
tmpfs                                1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/pdc_bbfbjjfjce1          472M  470M     0 100% /boot
tmpfs                                370M     0  370M   0% /run/user/1000

Is there something that can be done via ssh or is it necessary to boot on a cd to modify the partitioning ?

0

1 Answer 1

1

You have a lot of kernels which you don't need installed. Those take up space on your boot partition.

Remove the unneeded ones:

sudo apt-get autoremove

Then fix your dependencies:

sudo apt-get -f install

And then do what you wanted to do originally:

sudo apt-get install default-jdk
3
  • Thank you. Unfortunately, sudo apt-get autoremove does not work. It says : The following packages have unmet dependencies: linux-image-extra-4.4.0-79-generic : Depends: linux-image-4.4.0-79-generic but it is not installed
    – SoukuGaal
    Jun 18, 2017 at 14:47
  • Oh, this might be hard without repartitioning. Does sudo apt-get remove linux-image-extra-4.4.0-79-generic work?
    – UTF-8
    Jun 18, 2017 at 15:35
  • Look at this question askubuntu.com/q/585736/379351, it should help you. Jun 18, 2017 at 15:51

Not the answer you're looking for? Browse other questions tagged .