16.04 Não é possível executar o apt-get qualquer coisa, sempre obter um erro

3

Eu recebo este erro:

$ apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-extra-4.4.0-53-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 161 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 227614 files and directories currently installed.)
Removing linux-image-extra-4.4.0-53-generic (4.4.0-53.74) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-53-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
sort: /lib/x86_64-linux-gnu/libpthread.so.0: version 'GLIBC_2.275' not found (required by sort)
sort: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.4' not found (required by sort)
sort: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.275' not found (required by sort)
run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.4.0-53-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Quando tento remover o pacote ofensivo com o dpkg:

$ sudo dpkg --purge linux-image-extra-4.4.0-53-generic
(Reading database ... 227614 files and directories currently installed.)
Removing linux-image-extra-4.4.0-53-generic (4.4.0-53.74) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-53-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
sort: /lib/x86_64-linux-gnu/libpthread.so.0: version 'GLIBC_2.275' not found (required by sort)
sort: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.4' not found (required by sort)
sort: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.275' not found (required by sort)
run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--purge):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.4.0-53-generic

Não é possível instalar a libc (não sei por que ela não está lá) b / c Não consigo executar apt-get .

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial
$ apt-cache policy libc6 coreutils linux-image-extra-4.4.0-53-generic
libc6:
  Installed: 2.23-0ubuntu5
  Candidate: 2.23-0ubuntu5
  Version table:
 *** 2.23-0ubuntu5 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.23-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
coreutils:
  Installed: 8.25-2ubuntu2
  Candidate: 8.25-2ubuntu2
  Version table:
 *** 8.25-2ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
linux-image-extra-4.4.0-53-generic:
  Installed: 4.4.0-53.74
  Candidate: 4.4.0-53.74
  Version table:
 *** 4.4.0-53.74 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
    
por user1130176 13.01.2017 / 23:45

1 resposta

2

Parece que os pacotes libc6 e / ou coreutils estão corrompidos. Para corrigir o problema, é necessário reinstalá-los sem a ajuda das operações do pacote Apt.

  1. Faça o download dos arquivos do pacote libc6 e coreutils em um diretório temporário (ou onde você quiser mantê-los até o final da instalação):

    cd /tmp
    apt-get download libc6 coreutils
    
  2. Instale-os:

    sudo dpkg -i {libc6,coreutils}_*.deb
    
  3. Corrija os problemas de embalagem restantes com o Apt:

    sudo apt-get install -f
    
por David Foerster 14.01.2017 / 19:12

Tags