Como reinstalar o linux-image-4.4.0-70-generic para removê-lo corretamente?

3

Corri em um espaço baixo em /boot issue e emiti o seguinte comando para tentar limpá-lo:

# rm /boot/vmlinuz-4.4.0-{x, y, z, 70}-generic && dpkg --purge linux-image-4.4.0-{x, y, z, 70}-generic

Onde x , y são z são versões removidas e não lembro o número delas.

Mas quando tento atualizar alguma coisa, isso é mostrado no console:

# apt-get update && apt-get upgrade
Hit:1 http://ftp.heanet.ie/pub/ubuntu xenial InRelease
Ign:2 http://mintlinux.mirror.triple-it.nl/packages serena InRelease                        
Get:3 http://ftp.heanet.ie/pub/ubuntu xenial-updates InRelease [102 kB]                     
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                
Hit:5 http://archive.canonical.com/ubuntu xenial InRelease                                  
Hit:6 http://mintlinux.mirror.triple-it.nl/packages serena Release                          
Hit:7 http://ppa.launchpad.net/atareao/atareao/ubuntu xenial InRelease                      
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]                  
Hit:9 http://dl.google.com/linux/chrome/deb stable Release                                  
Hit:10 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu xenial InRelease                      
Get:12 http://ftp.heanet.ie/pub/ubuntu xenial-backports InRelease [102 kB]                  
Hit:14 http://repository.spotify.com stable InRelease                                       
Hit:15 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial InRelease                       
Hit:16 https://apt.dockerproject.org/repo ubuntu-xenial InRelease                           
Hit:17 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:18 https://dl.yarnpkg.com/debian stable InRelease
Hit:19 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 306 kB in 2s (108 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-4.4.0-70-generic (4.4.0-70.91) ...
Internal Error: Could not find image (/boot/vmlinuz-4.4.0-70-generic)
dpkg: error processing package linux-image-4.4.0-70-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-70-generic:
 linux-image-extra-4.4.0-70-generic depends on linux-image-4.4.0-70-generic; however:
  Package linux-image-4.4.0-70-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-70-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-4.4.0-70-generic; however:
  Package linux-image-4.4.0-70-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-4.4.0-70-generic; however:
  Package linux-image-extra-4.4.0-70-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-virtual:
 linux-image-extra-virtual depends on linux-image-generic (= 4.4.0.70.76); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-image-extra-virtual (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.4.0-70-generic
 linux-image-extra-4.4.0-70-generic
 linux-image-generic
 linux-image-extra-virtual
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por gtludwig 29.03.2017 / 17:08

1 resposta

4

Como você descobriu, remover arquivos antes de eliminar o pacote causa problemas para o gerenciador de pacotes. Você basicamente tem que restaurar as coisas que você apagou, que o gerenciador de pacotes está reclamando. Os arquivos restaurados podem ter tamanho zero, o gerenciador de pacotes não se importa, então use o comando "touch". por exemplo:

sudo touch /boot/vmlinuz-4.4.0-70-generic

Você pode ter que criar alguns diretórios também, mas quando o gerenciador de pacotes encontrar os arquivos desejados, ele será concluído com êxito.

    
por ubfan1 29.03.2017 / 17:58