Tuesday, 19 December 2017

I think the following problems are the same:

Problem 1:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Problem  2:
sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-extra-4.4.0-104-generic (4.4.0-104.127) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-104-generic /boot/vmlinuz-4.4.0-104-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-104-generic /boot/vmlinuz-4.4.0-104-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-104-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-104-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-104-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-extra-4.4.0-104-generic; however:
  Package linux-image-extra-4.4.0-104-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 4.4.0.104.109); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-4.4.0-98-generic (4.4.0-98.121) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                                             Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-98-generic
vmlinuz(/boot/vmlinuz-4.4.0-98-generic
) points to /boot/vmlinuz-4.4.0-98-generic
 (/boot/vmlinuz-4.4.0-98-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-98-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-98-generic /boot/vmlinuz-4.4.0-98-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-98-generic /boot/vmlinuz-4.4.0-98-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-98-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-98-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-4.4.0-98-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-98-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-98-generic:
 linux-image-extra-4.4.0-98-generic depends on linux-image-4.4.0-98-generic; however:
  Package linux-image-4.4.0-98-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-98-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.4.0-104-generic
 linux-image-generic
 linux-generic
 linux-image-4.4.0-98-generic
 linux-image-extra-4.4.0-98-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Problem  3:
The volume "boot" has only  bytes disk space remaining

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Solution:

Step 1:
List all the current existing kernels.

ls /boot/ | grep vmlinuz
vmlinuz-4.4.0-104-generic
vmlinuz-4.4.0-97-generic
vmlinuz-4.4.0-98-generic

Step 2:
Find the current kernel in use.

uname -r
4.4.0-97-generic

Step 3:
Remove one of them not in use:

sudo apt-get purge linux-image-4.4.0-104-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic linux-headers-generic thermald
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.



ref:
https://askubuntu.com/questions/218783/the-volume-boot-has-only-0-bytes-disk-space-remaining


No comments:

Post a Comment