erro fatal irrecuperável, abortando: arquivo de lista de arquivos para o pacote 'tzdata' está faltando nova linha final

1

Eu inventei essa questão desde ontem

Já verifiquei algumas mensagens existentes de onde fiz o seguinte:

sudo mv /var/lib/dpkg/info/linux* /tmp/mcrose/
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade

Eu tenho alguns problemas novamente, então eu corri

sudo apt-get clean
dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade

e depois recebi estes erros:

mcrose@home:~$ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  adobe-flash-properties-gtk adobe-flashplugin budgie-welcome chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra
  gnome-software gnome-software-common gnome-software-plugin-snap libssl1.0.0 libxml2 openssl python-libxml2 ubuntu-fan vivaldi-stable
15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 147 MB of archives.
After this operation, 47,7 MB of additional disk space will be used.
Get:1 http://py.archive.ubuntu.com/ubuntu zesty-updates/universe amd64 chromium-browser-l10n all 63.0.3239.84-0ubuntu0.17.04.1 [2.640 kB]
Get:2 http://repo.vivaldi.com/stable/deb stable/main amd64 vivaldi-stable amd64 1.13.1008.36-1 [49,3 MB]                                
Get:3 http://archive.canonical.com/ubuntu zesty/partner amd64 adobe-flash-properties-gtk amd64 1:20171212.1-0ubuntu0.17.04.1 [143 kB]
Get:4 http://ppa.launchpad.net/ubuntubudgie/backports/ubuntu zesty/main amd64 budgie-welcome all 0.5.8 [5.084 kB]                       
Get:5 http://archive.canonical.com/ubuntu zesty/partner amd64 adobe-flashplugin amd64 1:20171212.1-0ubuntu0.17.04.1 [9.781 kB]          
Get:6 http://py.archive.ubuntu.com/ubuntu zesty-updates/universe amd64 chromium-browser amd64 63.0.3239.84-0ubuntu0.17.04.1 [73,7 MB]   
Get:2 http://repo.vivaldi.com/stable/deb stable/main amd64 vivaldi-stable amd64 1.13.1008.36-1 [49,3 MB]                                
Get:7 http://py.archive.ubuntu.com/ubuntu zesty-updates/universe amd64 chromium-codecs-ffmpeg-extra amd64 63.0.3239.84-0ubuntu0.17.04.1 [1.010 kB]
Get:8 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu11.4 [1.080 kB]                      
Get:9 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libxml2 amd64 2.9.4+dfsg1-2.2ubuntu0.3 [698 kB]                      
Get:10 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 openssl amd64 1.0.2g-1ubuntu11.4 [491 kB]                           
Get:11 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 gnome-software-plugin-snap amd64 3.22.7-0ubuntu3.17.04.8 [27,5 kB]  
Get:12 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 gnome-software amd64 3.22.7-0ubuntu3.17.04.8 [305 kB]               
Get:13 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 gnome-software-common all 3.22.7-0ubuntu3.17.04.8 [2.481 kB]        
Get:14 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 python-libxml2 amd64 2.9.4+dfsg1-2.2ubuntu0.3 [140 kB]              
Get:15 http://py.archive.ubuntu.com/ubuntu zesty-updates/main amd64 ubuntu-fan all 0.12.8~17.04.1 [34,7 kB]                             
Fetched 134 MB in 18min 22s (121 kB/s)                                                                                                  
Preconfiguring packages ...
dpkg: warning: files list file for package 'linux-sound-base' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-image-extra-4.10.0-42-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-4.10.0-40' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-headers-4.10.0-40' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-base' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-libc-dev:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-4.10.0-19' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-4.10.0-19-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-headers-4.10.0-42-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-4.10.0-42' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-image-extra-4.10.0-40-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-image-4.10.0-42-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-4.10.0-42-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-4.10.0-40-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-image-4.10.0-40-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-headers-4.10.0-42' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-headers-4.10.0-40-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-tools-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-image-generic' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-firmware' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'linux-headers-generic' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'tzdata' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Estou usando o Ubuntu Budgie

mcrose@home:~$ cat /etc/issue
Ubuntu 17.04 \n \l
mcrose@home:~$ uname -a
Linux home 4.10.0-42-generic #46-Ubuntu SMP Mon Dec 4 14:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
mcrose@home:~$ 
    
por Icarus 18.12.2017 / 22:18

1 resposta

2

Este comando (re) move os meta-dados do pacote e é uma má ideia:

mv /var/lib/dpkg/info/linux* /tmp/mcrose/

Os arquivos em /var/lib/dpkg são parte do estado interno do gerenciador de pacotes Debian e devem ser manipulados exclusivamente com o aplicativo ou biblioteca dpkg . Geralmente, é uma má ideia tocar em nada em /var/lib/dpkg diretamente , a menos que você conheça realmente, realmente bem o que está fazendo.

Como os meta-dados do pacote foram removidos ou corrompidos, você deve reinstalar esses pacotes:

dpkg-query -Wf '${Status;1} ${Package}:${Architecture}\n' 'linux*' tzdata |
sed -ne 's/^i //p' |
xargs -rd '\n' -- sudo apt-get install -f --reinstall

É possível que dpkg ainda se queixe de uma lista de arquivos malformada de tzdata . Nesse caso, você pode removê-la completamente e tentar novamente sua reinstalação:

sudo rm /var/lib/dpkg/info/tzdata.*list

Eu suspeito que mais pacotes podem ter sido corrompidos. Você pode verificar sua integridade como descrito em Existe uma verificação de sanidade do Ubuntu? com os seguintes comandos:

sudo apt-get install debsums
sudo debsums_init
sudo debsums --changed --silent

em seguida, reinstale os pacotes mencionados manualmente com

sudo apt-get -f install
    
por David Foerster 18.12.2017 / 22:37