Minha máquina entrou em um estado em que não posso apt-get
nada.
Quando executo apt-get upgrade
, obtenho
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-headers-generic-lts-xenial : Depends: linux-headers-4.4.0-124-generic but it is not installed
E: Unmet dependencies. Try using -f.
Então eu faço apt-get -f install
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-headers-4.4.0-124 linux-headers-4.4.0-124-generic
The following NEW packages will be installed
linux-headers-4.4.0-124 linux-headers-4.4.0-124-generic
0 to upgrade, 2 to newly install, 0 to remove and 67 not to upgrade.
8 not fully installed or removed.
Need to get 0 B/10.8 MB of archives.
After this operation, 87.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 1218968 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.4.0-124_4.4.0-124.148~14.04.1_all.deb ...
Unpacking linux-headers-4.4.0-124 (4.4.0-124.148~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-124_4.4.0-124.148~14.04.1_all.deb (--unpack):
unable to create '/usr/src/linux-headers-4.4.0-124/include/net/irda/irqueue.h.dpkg-new' (while processing './usr/src/linux-headers-4.4.0-124/include/net/irda/irqueue.h'): 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)
Preparing to unpack .../linux-headers-4.4.0-124-generic_4.4.0-124.148~14.04.1_amd64.deb ...
Unpacking linux-headers-4.4.0-124-generic (4.4.0-124.148~14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-124-generic_4.4.0-124.148~14.04.1_amd64.deb (--unpack):
error creating directory './usr/src/linux-headers-4.4.0-124-generic/include/config/altera': 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)
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-4.4.0-124_4.4.0-124.148~14.04.1_all.deb
/var/cache/apt/archives/linux-headers-4.4.0-124-generic_4.4.0-124.148~14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Indica que o disco está cheio. Ele tem cerca de 3GB e 3.7k inodes livres, então não sei se acredito que esse é realmente o problema:
root@laptop15:/tmp# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 4.0K 3.9G 1% /dev
tmpfs 788M 2.3M 786M 1% /run
/dev/sda5 20G 17G 2.0G 90% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 31M 3.9G 1% /run/shm
none 100M 40K 100M 1% /run/user
/dev/sda1 47M 3.2M 44M 7% /boot/efi
/dev/sda4 200G 119G 72G 63% /home
/dev/sda2 880M 12M 802M 2% /scratch
/dev/loop0 87M 87M 0 100% /snap/core/4571
/dev/loop1 87M 87M 0 100% /snap/core/4407
/dev/loop2 87M 87M 0 100% /snap/core/4486
root@laptop15:/tmp# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 1005270 496 1004774 1% /dev
tmpfs 1008404 592 1007812 1% /run
/dev/sda5 1305600 1301852 3748 100% /
none 1008404 15 1008389 1% /sys/fs/cgroup
none 1008404 5 1008399 1% /run/lock
none 1008404 385 1008019 1% /run/shm
none 1008404 33 1008371 1% /run/user
/dev/sda1 0 0 0 - /boot/efi
/dev/sda4 13279232 321559 12957673 3% /home
/dev/sda2 65408 14 65394 1% /scratch
/dev/loop0 12831 12831 0 100% /snap/core/4571
/dev/loop1 12817 12817 0 100% /snap/core/4407
/dev/loop2 12819 12819 0 100% /snap/core/4486
Eu já liberei um monte de espaço, mas isso não ajudou. Uma quantidade enorme de espaço e inodes é usada pelos antigos pacotes linux-headers
, linux-image
e linux-image-extra
que nunca são excluídos. / usr / share contém 4.3GB / 960.871 arquivos pertencentes a linux-headers
, por exemplo.
apt-get autoremove
e apt-get autoremove -f
ambos falham de maneira semelhante. Eu estou preso sendo dito para liberar espaço, mas a coisa usando o espaço não funciona porque (diz) não há espaço, mesmo que haja.
Como posso sair deste ciclo por favor?