APT relata disco cheio mas disco não está cheio!

2

Normalmente, eu sou capaz de google meu caminho para fora de problemas com o apt, mas este me deixou perplexo. Obviamente, está reclamando de falta de espaço em disco, mas está relatando que ele não pode nem criar um diretório em sda1?

Qualquer sugestão seria muito apreciada!

Aqui está minha saída do que tentei.

duncan@BEDROOM:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.6G  4.0K  1.6G   1% /dev
tmpfs           328M  1.4M  326M   1% /run
/dev/sda1        14G  9.8G  3.1G  76% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            1.6G   13M  1.6G   1% /run/shm
none            100M  8.0K  100M   1% /run/user



duncan@BEDROOM:~$ sudo apt-get clean


duncan@BEDROOM:~$ sudo apt-get install
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 : Depends: linux-headers-3.13.0-100-generic but it is not installed
E: Unmet dependencies. Try using -f.

duncan@BEDROOM:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-headers-3.13.0-100-generic
The following NEW packages will be installed
linux-headers-3.13.0-100-generic
0 to upgrade, 1 to newly install, 0 to remove and 5 not to upgrade.
1 not fully installed or removed.
Need to get 688 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Get:1 http://gb.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-headers-3.13.0-100-generic i386 3.13.0-100.147 [688 kB]
Fetched 688 kB in 1s (433 kB/s)                           
(Reading database ... 422618 files and directories currently installed.)
Preparing to unpack .../linux-headers-3.13.0-100-generic_3.13.0-100.147_i386.deb ...
Unpacking linux-headers-3.13.0-100-generic (3.13.0-100.147) ...
No apport report written because the error message indicates a disk full error
dpkg: error processing archive /var/cache/apt/archives/linux-headers-3.13.0-100-generic_3.13.0-100.147_i386.deb (--unpack):
unable to create '/usr/src/linux-headers-3.13.0-100-generic/include/config/sensors/g762.h.dpkg-new' (while processing './usr/src/linux-headers-3.13.0-100-generic/include/config/sensors/g762.h'): No space left on device
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-3.13.0-100-generic_3.13.0-100.147_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

e, caso seja importante:

duncan@BEDROOM:~$ uname -a
Linux BEDROOM 3.13.0-100-generic #147-Ubuntu SMP Tue Oct 18 16:49:53 UTC 2016 i686 athlon i686 GNU/Linux
    
por DRCL 22.10.2016 / 14:19

2 respostas

2

Acontece que o disco estava meio cheio. Eu estava perto de exaustivos inodes.

root@BEDROOM:~# df -i

Filesystem     Inodes  IUsed  IFree IUse% Mounted on
udev           207347    498 206849    1% /dev
tmpfs          214299    525 213774    1% /run
/dev/sda1      909312 906196   3116  100% /
none           214299      2 214297    1% /sys/fs/cgroup
none           214299      3 214296    1% /run/lock
none           214299    133 214166    1% /run/shm
none           214299     10 214289    1% /run/user

Precisa descobrir o que está usando tantos agora.

Edit: Ironicamente, eram os antigos arquivos de cabeçalho linux que ocupavam muitos inodes. Então eu apaguei as 2 versões mais antigas manualmente de / usr / src que liberaram o suficiente para fazer o seu script, que por sua vez liberou ainda mais.

Depois de executar o purgador do apt-get $ OLDCONF no script do kyodake:

Filesystem     Inodes  IUsed  IFree IUse% Mounted on
/dev/sda1      909312 889004  20308   98% /

Depois de executar o purgador do apt-get $ OLDKERNELS

Filesystem     Inodes  IUsed  IFree IUse% Mounted on
/dev/sda1      909312 644406 264906   71% /

e agora tenho outro 4gb livre

Obrigado Kyodake!

    
por DRCL 22.10.2016 / 17:04
0

Tente isto:

Abra um terminal

Pressione Ctrl + Alt + T

Execute:

exec sudo -i
OLDCONF=$(dpkg -l|grep "^rc"|awk '{print }')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print }'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
apt-get clean
apt-get purge $OLDCONF
apt-get purge $OLDKERNELS
rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
rm -rf /root/.local/share/Trash/*/** &> /dev/null
apt-get update
apt-get -f install
apt-get dist-upgrade
dpkg --configure -a
apt-get clean
    
por kyodake 22.10.2016 / 15:01