12.04 gerenciamento de pacotes corrompido

0

Eu tenho um sistema Ubuntu 12.04, onde não consigo adicionar nenhum pacote. Nós achamos que o que aconteceu foi que uma partição ficou 100% cheia, e uma atualização ficou parcialmente concluída e agora o gerenciamento de pacotes está em mau estado.

Saída do uname:

$ uname -a
Linux right 3.13.0-93-generic #140~precise1-Ubuntu SMP Tue Jul 19 19:55:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Quando adiciono um pacote, recebo um erro de dependência:

$ sudo apt-get install netperf
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-trusty : Depends: linux-headers-3.13.0-93-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

A instalação da dependência falha:

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

Tentando instalar a dependência linux-headers-3.13.0-93 também falha:

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

A execução de "sudo apt-get -f install" atinge o mesmo problema:

$ 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:
  linux-headers-3.13.0-43 linux-tools-3.2.0-102 linux-headers-3.13.0-43-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-headers-generic-lts-trusty
The following packages will be upgraded:
  linux-headers-generic-lts-trusty
1 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,364 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of linux-headers-generic-lts-trusty:
 linux-headers-generic-lts-trusty depends on linux-headers-3.13.0-93-generic; however:
  Package linux-headers-3.13.0-93-generic is not installed.
dpkg: error processing linux-headers-generic-lts-trusty (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-trusty:
 linux-generic-lts-trusty depends on linux-headers-generic-lts-trusty; however:
  Package linux-headers-generic-lts-trusty is not configured yet.
dpkg: error processing linux-generic-lts-trusty (--configure):
 dependency problems - leaving unconfigured
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.
Errors were encountered while processing:
 linux-headers-generic-lts-trusty
 linux-generic-lts-trusty
E: Sub-process /usr/bin/dpkg returned an error code (1)

Os comandos:

sudo apt-get clean
sudo apt-get autoclean

... não tem efeito sobre o assunto.

A tentativa de "dist-upgrade" também falha:

$ sudo apt-get -u dist-upgrade
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-trusty : Depends: linux-headers-3.13.0-93-generic but it is not installed
E: Unmet dependencies. Try using -f.

Alguém tem ideias sobre como fazer as coisas funcionarem?

Obrigado Stuart

    
por b08248 05.10.2016 / 16:19

1 resposta

0

Consegui resolver isso baixando os pacotes e depois instalando usando o dpkg.

sudo apt-get download linux-headers-3.13.0-93-generic  
sudo apt-get download linux-headers-3.13.0-93  

Então:

sudo dpkg -i linux-headers-3.13.0-93_3.13.0-93.140~precise1_all.deb  
sudo dpkg -i linux-headers-3.13.0-93-generic_3.13.0-93.140~precise1_amd64.deb  

Depois disso, as coisas funcionaram.

    
por Stuart Yoder 11.01.2017 / 17:55