it-swarm.com.de

dpkg: Warnung: Dateilistendatei für Paket 'x' fehlt

Ich erhalte diese Warnung für mehrere Pakete jedes Mal, wenn ich any package installiere oder apt-get upgrade Ausführe. Nicht sicher, was es verursacht; Es ist eine neue Debian-Installation auf meinem OpenVZ-Server und ich habe keine dpkg-Einstellungen geändert.

Hier ist ein Beispiel:

[email protected]:~# apt-get install cowsay
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  filters
The following NEW packages will be installed:
  cowsay
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.9 kB of archives.
After this operation, 91.1 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ unstable/main cowsay all 3.03+dfsg1-4 [21.9 kB]
Fetched 21.9 kB in 0s (70.2 kB/s)
Selecting previously unselected package cowsay.
dpkg: warning: files list file for package 'libssh2-1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libkrb5-3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libwrap0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcap2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpam-ck-connector:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libc6:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtalloc2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libselinux1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libp11-kit0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-client3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libbz2-1.0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpcre3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgpm2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgnutls26:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-common3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcroco3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblzma5:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpaper1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsensors4:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libbsd0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libavahi-common-data:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libss2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libblkid1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libslang2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libacl1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcomerr2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libkrb5support0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'e2fslibs:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'librtmp0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libidn11:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpcap0.8:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libattr1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libdevmapper1.02.1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'odbcinst1debian2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libexpat1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libltdl7:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libkeyutils1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcups2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsqlite3-0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libck-connector0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'zlib1g:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libnl1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libfontconfig1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libudev0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsepol1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmagic1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libk5crypto3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libunistring0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgpg-error0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libusb-0.1-4:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpam0g:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpopt0:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgssapi-krb5-2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgeoip1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcurl3-gnutls:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtasn1-3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libuuid1:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgcrypt11:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libgdbm3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libdbus-1-3:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libsysfs2:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libfreetype6:AMD64' missing; assuming package has no files currently installed
(Reading database ... 21908 files and directories currently installed.)
Unpacking cowsay (from .../cowsay_3.03+dfsg1-4_all.deb) ...
Processing triggers for man-db ...
Setting up cowsay (3.03+dfsg1-4) ...
[email protected]:~# 

Alles funktioniert gut, aber diese Warnmeldungen sind ziemlich nervig. Weiß jemand, wie ich das beheben kann?

ls -la /var/lib/dpkg/info | grep libssh:

-rw-r--r-- 1 root root    327 Sep 21 15:51 libssh2-1.list
-rw-r--r-- 1 root root    359 Aug 15 06:06 libssh2-1.md5sums
-rwxr-xr-x 1 root root    135 Aug 15 06:06 libssh2-1.postinst
-rwxr-xr-x 1 root root    132 Aug 15 06:06 libssh2-1.postrm
-rw-r--r-- 1 root root     20 Aug 15 06:06 libssh2-1.shlibs
-rw-r--r-- 1 root root   4377 Aug 15 06:06 libssh2-1.symbols
22
Mark

He Die Neuinstallation der dort angezeigten Dateien wurde behoben. Vielleicht möchten Sie so etwas ausprobieren:

for package in $(apt-get upgrade 2>&1 |\
                 grep "warning: files list file for package '" |\
                 grep -Po "[^'\n ]+'" | grep -Po "[^']+"); do
    apt-get install --reinstall "$package";
done

Kopieren-Einfügen freundlich in einer Zeile:

for package in $(apt-get upgrade 2>&1 | grep "warning: files list file for package '" | grep -Po "[^'\n ]+'" | grep -Po "[^']+"); do apt-get install --reinstall "$package"; done

Beachten Sie, dass das Ausführen dieses Befehls einige Zeit in Anspruch nimmt , da wir jedes Paket durchlaufen.

In manchen Fällen apt upgrade zeigt die Fehler nicht an, daher können Sie ein Paket (zum Beispiel x) neu installieren, das den Fehler ausgibt, und wie folgt ausführen:

for package in $(apt-get install --reinstall x 2>&1 |\
             grep "warning: files list file for package '" |\
             grep -Po "[^'\n ]+'" | grep -Po "[^']+"); do
    apt-get install --reinstall "$package";
done
19
exic

Die obige Antwort hat bei mir nicht ganz funktioniert. Einige Pakete, nämlich libc6, zeigten diesen Fehler immer noch an.

Ich habe in einem Forum eine Lösung gefunden. Fehler ist, dass die neue Version von libc keine Liste der Dateien zur Korrektur der Datei wiedergegeben hat. Anstatt es an /var/lib/dpkg/info/libc6:AMD64.list es wiederholte es zu /var/lib/dpkg/info/libc6.list

Es kann durch Ausführen behoben werden (passen Sie es an Ihre neueste Version und Arch of libc6 an):

dpkg-deb -c /var/cache/apt/archives/libc6_2.13-38_AMD64.deb | awk {'print $6'} | cut -f2- -d. | sed 's|^/$|/.|' | sed 's|/$||' > /var/lib/dpkg/info/libc6:AMD64.list

Quelle: http://forums.debian.net/viewtopic.php?f=5&t=93201

Viel Glück für alle, die dies in Zukunft lesen und für brauchbar halten.

7
dzhi

Versuchen Sie, dieses Skript zu speichern:

for package in $(Sudo apt-get install catdoc 2>&1 | grep "warning: files list file for package '" | grep -Po "[^'\n ]+'" | grep -Po "[^']+");
do
  Sudo apt-get -y install --reinstall "$package"
done

Führen Sie es dann mit aus

Sudo /bin/bash ./scriptname

Dies erforderte ein wenig zusätzliche Arbeit und einige andere Befehle

Sudo apt-get -f install
Sudo apt-mark hold packagename
Sudo dpkg -r --force-depends packagename

zusammen mit dem Entfernen und Neuinstallieren einiger spezifischer Pakete.

Dies kostet einiges an Zeit und Mühe, immer noch ein apt-get zeigt jedoch einige Fehler an.

2
user308018

Nicht genügend Vertreter, um einen Kommentar abzugeben: @exic/@mark, ich habe festgestellt, dass ein Backtick am Anfang des Paketnamens und danach ein Anführungszeichen verwendet werden. Daher muss eine andere Interpunktion überprüft werden. Ich bin nicht sicher, ob dies verwandt war. Meine Lösung:

for package in $(apt-get upgrade 2>&1 | grep "warning: files list file" | sed "s/.*\`//; s/'.*//"); do apt-get install --reinstall "$package"; done
1
zaTricky

Bei allen anderen Antworten wird davon ausgegangen, dass Sie die Pakete erneut installieren möchten. In meinem Fall wollte ich das nicht. Ich hatte locate verwendet, um zu versuchen, alle Spuren von ihnen einschließlich ihrer passenden Dateilisten zu entfernen.

Der erste Schritt besteht darin, sicherzustellen, dass die Pakete mithilfe des Paketmanagers entfernt werden:

Sudo apt remove <package list>

Dann hat apt einen Befehl, den Sie ausführen können, um ihn zu bereinigen. Dadurch wird die Warnung entfernt, während die Pakete weiterhin deinstalliert werden:

Sudo apt autoclean

Quelle auf Ask Ubuntu: Dateilistendatei für Paket fehlt

1

Kopieren Sie die Fehlermeldung in eine Datei, z. B. 111.txt. Führen Sie dann den Befehl aus

for package in $(cat 111.txt | grep "warning: files list file" | sed "s/'//g" | sed "s/\`//g"|awk '{print $8}'); do apt-get purge "$package" -y; apt-get install "$package" -y;done
0
user259719

Ich benutze Deepin Linux Betriebssystem, ich habe die obigen Befehle geändert, um zu funktionieren. Ich benutze die chinesische Sprache. for package in $(sed "s/.*\ \(.*\)\ .*/\1/" error.txt); do apt-get install -y --reinstall "$package"; done wenn Sie Englisch verwenden

for package in $(sed "s/.*'\(.*\)'.*/\1/" error.txt); do apt-get install -y --reinstall "$package"; done

0
jay