1

My Ubuntu server runs on a VPS with 512mb RAM . I upgraded it from 14.04 to 16.04 . I'm trying to install phpmyadmin but there is some error:

~$ sudo apt-get install phpmyadmin
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-extra-4.4.0-72-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get autoremove:

$ 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-image-extra-4.4.0-72-generic : Depends: linux-image-4.4.0-72-generic but it is not installed
linux-image-generic : Depends: linux-image-4.4.0-72-generic but it is not    installed
E: Unmet dependencies. Try using -f.

sudo purge-old-kernels:

 $ sudo purge-old-kernels
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-extra-3.13.0-110-generic : Depends: linux-image-3.13.0-110-generic but it is not going to be installed
linux-image-extra-4.4.0-64-generic : Depends: linux-image-4.4.0-64-generic  but it is not going to be installed
linux-image-extra-4.4.0-66-generic : Depends: linux-image-4.4.0-66-generic but it is not going to be installed
linux-image-extra-4.4.0-72-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-4.4.0-72-generic but it is not going to be installed
 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f install:

 $ sudo apt-get -f install
 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:
apache2-bin dbconfig-common dbconfig-mysql libapr1 libaprutil1 libaprutil1-   dbd-sqlite3 libaprutil1-ldap libicu52 libjs-sphinxdoc libjs-underscore    libmysqlclient18 libzip4
  linux-headers-3.13.0-110 linux-headers-3.13.0-110-generic linux-headers- 4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic
  linux-image-3.13.0-110-generic linux-image-4.4.0-64-generic linux-image-4.4.0-66-generic linux-image-extra-3.13.0-110-generic linux-image-extra-4.4.0-64-generic
  linux-image-extra-4.4.0-66-generic php-phpseclib php-tcpdf
  Use 'sudo apt autoremove' to remove them.
 The following additional packages will be installed:
  linux-image-4.4.0-72-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-72-generic
0 upgraded, 1 newly installed, 0 to remove and 54 not upgraded.
4 not fully installed or removed.
Need to get 0 B/21.8 MB of archives.
After this operation, 66.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 230179 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-72-generic (4.4.0-72.93) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-72-  generic_4.4.0-72.93_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-72-generic' to '/boot  /vmlinuz-4.4.0-72-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-72-generic    /boot/vmlinuz-4.4.0-72-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-72-generic /boot/vmlinuz-4.4.0-72-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-72-generic_4.4.0-72.93_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

df -ah:

    $ df -ah
Filesystem                   Size  Used Avail Use% Mounted on
sysfs                           0     0     0    - /sys
proc                            0     0     0    - /proc
udev                         226M     0  226M   0% /dev
devpts                          0     0     0    - /dev/pts
tmpfs                         49M  2.5M   47M   6% /run
/dev/mapper/ubuntu--vg-root   19G  6.5G   12G  37% /
securityfs                      0     0     0    - /sys/kernel/security
tmpfs                        245M     0  245M   0% /dev/shm
tmpfs                        5.0M     0  5.0M   0% /run/lock
tmpfs                        245M     0  245M   0% /sys/fs/cgroup
cgroup                          0     0     0    - /sys/fs/cgroup/systemd
pstore                          0     0     0    - /sys/fs/pstore
cgroup                          0     0     0    - /sys/fs/cgroup/blkio
cgroup                          0     0     0    - /sys/fs/cgroup/net_cls,net_prio
cgroup                          0     0     0    - /sys/fs/cgroup/cpuset
cgroup                          0     0     0    - /sys/fs/cgroup/devices
cgroup                          0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup                          0     0     0    - /sys/fs/cgroup/hugetlb
cgroup                          0     0     0    - /sys/fs/cgroup/freezer
cgroup                          0     0     0    - /sys/fs/cgroup/perf_event
cgroup                          0     0     0    - /sys/fs/cgroup/memory
cgroup                          0     0     0    - /sys/fs/cgroup/pids
systemd-1                       -     -     -    - /proc/sys/fs/binfmt_misc
fusectl                         0     0     0    - /sys/fs/fuse/connections
mqueue                          0     0     0    - /dev/mqueue
debugfs                         0     0     0    - /sys/kernel/debug
hugetlbfs                       0     0     0    - /dev/hugepages
/dev/vda1                    236M  229M     0 100% /boot
cgmfs                        100K     0  100K   0% /run/cgmanager/fs
tmpfs                         49M     0   49M   0% /run/user/1000
binfmt_misc                     0     0     0    - /proc/sys/fs/binfmt_misc
pishva2005@parslet:~$ 

I dont know if it is boot being full or something else causing the problem.

  • 1
    Yes, it is. See askubuntu.com/questions/89710/… – Jos Apr 12 '17 at 13:51
  • there is an issue with apt command. i can not use apt-get remove while boot is full – alex Apr 12 '17 at 14:00
  • 2
    Ok. Plan B: manually remove files from /boot until apt works again. Be careful that you keep the latest two files. See askubuntu.com/questions/171209/… – Jos Apr 12 '17 at 14:03
  • WORKED. plan B saved my life . thanks @Jos – alex Apr 12 '17 at 14:29
0

The apt-get command won't function correctly because your /boot partition has reached its full capacity. What probably happened was that some kernel upgrade wasn't fully performed and as a result apt-get is stuck and will remain in a frozen state until you clear up some space in /boot. Find out the kernel versions installed by:

dpkg --list 'linux-image*'

Check the current version that is being used

uname -r

Remove the kernel installations you no longer require

sudo apt-get remove linux-image-version

Replace version with kernel version. After that

sudo apt-get autoremove

sudo update-grub

And finally update grub.

  • The point is, as the OP indicates in the comments, that apt-get remove doesn't work in this situation. – Jos Apr 12 '17 at 14:27
  • Thanks for answer . your description is correct . one kernel upgrade is not done correctly.but as i said i cant use apt-get remove , so i used plan B that is mentioned by @jos – alex Apr 12 '17 at 14:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.