Principais problemas tentando limpar / inicializar

0

12.04 LTS aqui, primeiro deixe-me começar com uma saída uname -a para você

3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux

Então, minha partição de inicialização estava em 100%. Um enorme não-não, então eu queria limpá-lo para que eu pudesse atualizar as ferramentas VMware nesta máquina. Eu corri o habitual

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-    9]\+\)//")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*//;/[0-9]/!d' | xargs sudo apt-get -y purge

No entanto, quando tento, continuo recebendo problemas sobre dependências não atendidas.

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-generic : Depends: linux-headers-generic (= 3.2.0.37.44) but 3.2.0.38.46 is to be installed linux-headers-generic : Depends: linux-headers-3.2.0-38-generic but it is not going to be installed linux-image-generic : Depends: linux-image-3.2.0-37-generic but it is not going to be installed linux-image-generic-pae : Depends: linux-image-3.2.0-37-generic-pae but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Se eu tentasse instalar qualquer coisa, claro, ele falharia se não houvesse espaço suficiente em / boot. Então, mudei alguns kernels mais antigos para / tmp por enquanto. Aqui está meu / tmp

drwxr-xr-x  2 root root     4096 Jan 14 19:34 hsperfdata_root
-rw-r--r--  1 root root  7906868 May 29  2012 initrd.img-2.6.28-19-server.old.0
-rw-r--r--  1 root root 17083030 Oct 26 10:57 initrd.img-3.2.0-27-generic
-rw-r--r--  1 root root 17096219 Oct 26 11:00 initrd.img-3.2.0-27-generic-pae
-rw-r--r--  1 root root 17085508 Dec 31 08:20 initrd.img-3.2.0-33-generic
-rw-r--r--  1 root root 17099160 Dec 31 08:20 initrd.img-3.2.0-33-generic-pae
-rw-r--r--  1 root root 17091480 Dec 31 08:23 initrd.img-3.2.0-34-generic
drwxr-xr-x 10 root root     4096 Feb 22 11:07 mkinitramfs_LzTuqq
-rw-------  1 root root        0 Feb 22 11:07 mkinitramfs-OL_lNbawL
-rw-------  1 root root  2249889 Jul  6  2012 System.map-3.2.0-27-generic
-rw-------  1 root root  2311276 Jul  6  2012 System.map-3.2.0-27-generic-pae
-rw-------  1 root root  2251905 Oct 18 13:27 System.map-3.2.0-33-generic
-rw-------  1 root root  2313292 Oct 18 13:41 System.map-3.2.0-33-generic-pae
-rw-------  1 root root  2252451 Nov 15 07:04 System.map-3.2.0-34-generic
-rw-------  1 root root  4855808 Jul  6  2012 vmlinuz-3.2.0-27-generic
-rw-------  1 root root  5010688 Jul  6  2012 vmlinuz-3.2.0-27-generic-pae
-rw-------  1 root root  4861280 Oct 18 13:27 vmlinuz-3.2.0-33-generic
-rw-------  1 root root  5015328 Oct 18 13:41 vmlinuz-3.2.0-33-generic-pae
-rw-------  1 root root  4862688 Nov 15 07:04 vmlinuz-3.2.0-34-generic
drwx------  2 root root     4096 Jan 14 19:34 vmware-root

Então, agora eu tento o aptitude safe-upgrade para ver se ele consertará os problemas com os kernels e ele parece ter instalado o 3.2.0-38, mas o 3.2.0-37 simplesmente não está no / boot, então eu acho que a questão.

Aqui está o que está na minha inicialização (49% usado depois de movê-los para / tmp e agora% 69 usado depois do upgrade seguro do aptitude).

-rw-r--r-- 1 root root   795776 Jul  6  2012 abi-3.2.0-27-generic
-rw-r--r-- 1 root root   800453 Jul  6  2012 abi-3.2.0-27-generic-pae
-rw-r--r-- 1 root root   797027 Oct 18 13:27 abi-3.2.0-33-generic
-rw-r--r-- 1 root root   801704 Oct 18 13:41 abi-3.2.0-33-generic-pae
-rw-r--r-- 1 root root   797082 Nov 15 07:04 abi-3.2.0-34-generic
-rw-r--r-- 1 root root   797121 Dec  5 13:52 abi-3.2.0-35-generic
-rw-r--r-- 1 root root   801798 Dec  5 14:06 abi-3.2.0-35-generic-pae
-rw-r--r-- 1 root root   797231 Jan  8 17:48 abi-3.2.0-36-generic
-rw-r--r-- 1 root root   801908 Jan  8 18:03 abi-3.2.0-36-generic-pae
-rw-r--r-- 1 root root   797340 Feb 19 08:29 abi-3.2.0-38-generic
-rw-r--r-- 1 root root   802017 Feb 19 08:44 abi-3.2.0-38-generic-pae
-rw-r--r-- 1 root root   147463 Jul  6  2012 config-3.2.0-27-generic
-rw-r--r-- 1 root root   147401 Jul  6  2012 config-3.2.0-27-generic-pae
-rw-r--r-- 1 root root   147497 Oct 18 13:27 config-3.2.0-33-generic
-rw-r--r-- 1 root root   147435 Oct 18 13:41 config-3.2.0-33-generic-pae
-rw-r--r-- 1 root root   147514 Nov 15 07:04 config-3.2.0-34-generic
-rw-r--r-- 1 root root   147514 Dec  5 13:52 config-3.2.0-35-generic
-rw-r--r-- 1 root root   147452 Dec  5 14:06 config-3.2.0-35-generic-pae
-rw-r--r-- 1 root root   147514 Jan  8 17:48 config-3.2.0-36-generic
-rw-r--r-- 1 root root   147452 Jan  8 18:03 config-3.2.0-36-generic-pae
-rw-r--r-- 1 root root   147497 Feb 19 08:29 config-3.2.0-38-generic
-rw-r--r-- 1 root root   147435 Feb 19 08:44 config-3.2.0-38-generic-pae
drwxr-xr-x 3 root root     5120 Feb 22 11:25 grub
-rw-r--r-- 1 root root 17092973 Dec 31 10:09 initrd.img-3.2.0-35-generic
-rw-r--r-- 1 root root 17101417 Dec 31 10:09 initrd.img-3.2.0-35-generic-pae
-rw-r--r-- 1 root root 17093970 Jan 18 06:52 initrd.img-3.2.0-36-generic
-rw-r--r-- 1 root root 17103977 Jan 18 06:52 initrd.img-3.2.0-36-generic-pae
-rw-r--r-- 1 root root 17090717 Feb 22 11:23 initrd.img-3.2.0-38-generic
-rw-r--r-- 1 root root 17098330 Feb 22 11:25 initrd.img-3.2.0-38-generic-pae
drwxr-xr-x 2 root root    12288 Jul  2  2009 lost+found
-rw-r--r-- 1 root root   176764 Nov 27  2011 memtest86+.bin
-rw-r--r-- 1 root root   178944 Nov 27  2011 memtest86+_multiboot.bin
-rw------- 1 root root  2252128 Dec  5 13:52 System.map-3.2.0-35-generic
-rw------- 1 root root  2314162 Dec  5 14:06 System.map-3.2.0-35-generic-pae
-rw------- 1 root root  2252687 Jan  8 17:48 System.map-3.2.0-36-generic
-rw------- 1 root root  2314721 Jan  8 18:03 System.map-3.2.0-36-generic-pae
-rw------- 1 root root  2253664 Feb 19 08:29 System.map-3.2.0-38-generic
-rw------- 1 root root  2315698 Feb 19 08:44 System.map-3.2.0-38-generic-pae
-rw------- 1 root root  4863712 Dec  5 13:52 vmlinuz-3.2.0-35-generic
-rw------- 1 root root  5017984 Dec  5 14:06 vmlinuz-3.2.0-35-generic-pae
-rw------- 1 root root  4864480 Jan  8 17:48 vmlinuz-3.2.0-36-generic
-rw------- 1 root root  5019456 Jan  8 18:03 vmlinuz-3.2.0-36-generic-pae
-rw------- 1 root root  4864128 Feb 19 08:29 vmlinuz-3.2.0-38-generic
-rw------- 1 root root  5018240 Feb 19 08:44 vmlinuz-3.2.0-38-generic-pae

Não importa o que eu faça, eu simplesmente não posso limpar os kernels antigos da maneira correta. Ele sempre me dá um erro de dependência e sugere tentar o apt-get-f install. Bem, mesmo o apt-get -f install me dá erros.

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-generic linux-image-generic linux-image-generic-pae
The following packages will be upgraded:
  linux-generic linux-image-generic linux-image-generic-pae
3 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
4 not fully installed or removed.
Need to get 0 B/6,944 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-image-generic:
 linux-image-generic depends on linux-image-3.2.0-37-generic; however:
  Package linux-image-3.2.0-37-generic is not installed.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency         problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.2.0.37.44); however:
  Package linux-image-generic is not configured yet.
 linux-generic depends on linux-headers-generic (= 3.2.0.37.44); however:
  Version of linux-headers-generic on system is 3.2.0.38.46.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency     problems prevent configuration of linux-image-generic-pae:
 linux-image-generic-pae depends on linux-image-3.2.0-37-generic-pae; however:
  Package linux-image-3.2.0-37-generic-pae is not installed.
dpkg: error processing linux-image-generic-pae (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency     problems prevent configuration of linux-image-server:
 linux-image-server depends on linux-image-generic-pae; however:
  Package linux-image-generic-pae is not configured yet.
dpkg: error processing linux-image-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered     while processing:
 linux-image-generic
 linux-generic
 linux-image-generic-pae
 linux-image-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Não importa o que eu tente, ele faz referência a essas imagens / kernels liux.

Por favor, ajude!

    
por cypherstream 22.02.2013 / 18:03

1 resposta

1

Primeiro, você precisa colocar seu sistema em um estado sadio, fazendo com que todas as dependências sejam atendidas.

Execute o seguinte comando para fazer isso.

sudo apt-get --reinstall --force-yes install linux-image-3.2.0-37-generic linux-image-generic linux-headers-generic linux-image-3.2.0-37-generic-pae linux-image-generic-pae

Tenha cuidado com o --force-yes . Você não quer usar esse interruptor a menos que você realmente precise e seja especialmente cuidadoso ao purgar, ele pode realmente atrapalhar seu sistema.

Quando o seu sistema estiver em bom estado, dê uma olhada no que esse comando irá limpar antes de enviá-lo diretamente para o apt-get.

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)//")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*//;/[0-9]/!d'

Se você quiser limpar os pacotes listados, repita o comando com o pipe para sudo apt-get -y purge

    
por Richard Ayotte 23.02.2013 / 02:11