Otrzymuję to ostrzeżenie dla kilku pakietów za każdym razem, gdy instaluję dowolny pakiet lub wykonuję apt-get upgrade
. Nie jestem pewien, co go powoduje; to nowa instalacja Debiana na moim serwerze OpenVZ i nie zmieniłem żadnych ustawień dpkg.
Oto przykład:
root@debian:~# 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) ...
root@debian:~#
Wszystko działa dobrze, ale te komunikaty ostrzegawcze są dość denerwujące. Czy ktoś wie, jak to naprawić?
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
ls -la /var/lib/dpkg/info | grep libssh
?apt-get update
?Odpowiedzi:
On naprawić go ponownie zainstalować pliki, które pojawiły się tam. Możesz więc spróbować czegoś takiego:
Przyjazny dla kopiuj-wklej w jednym wierszu:
Pamiętaj, że uruchomienie tego polecenia zajmuje trochę czasu , ponieważ przeglądamy każdy pakiet.
W niektórych przypadkach
apt upgrade
błędy nie są wyświetlane, dlatego można ponownie zainstalować jeden pakiet (na przykład x), który daje błąd i wykonać w następujący sposób:źródło
-bash: syntax error near unexpected token ``do'
. Nie dobry w bash; czy mógłbyś to naprawić?for
poprzedniej linii?sudo bash
a następnie wklej skryptPowyższa odpowiedź nie działała dla mnie całkowicie. Kilka pakietów, a mianowicie libc6, nadal wyświetlało ten błąd.
Znalazłem rozwiązanie na jednym forum. Błąd polega na tym, że nowa wersja libc nie wyświetlała listy plików w celu poprawienia pliku. Zamiast echa do
/var/lib/dpkg/info/libc6:amd64.list
niego, echo do/var/lib/dpkg/info/libc6.list
Można to naprawić, uruchamiając (dostosuj do najnowszej wersji i arch libc6):
Źródło: http://forums.debian.net/viewtopic.php?f=5&t=93201
Życzymy powodzenia każdemu, kto przeczyta to w przyszłości i uzna to za przydatne.
źródło
dpkg-deb -c /var/cache/apt/archives/libc6_2.13-38_amd64.deb
ma wpisy z dowiązaniami symbolicznymi, np.dpkg-deb -c /var/cache/apt/archives/mc_3%3a4.8.13-3_amd64.deb | grep mc.csh
Zwraca./usr/share/mc/bin/mc.csh -> ../../../lib/mc/mc.csh
Spróbuj zapisać ten skrypt:
Następnie wykonaj to za pomocą
Zajęło to trochę dodatkowej pracy i kilka innych poleceń
wraz z usunięciem i ponowną instalacją niektórych konkretnych pakietów.
Zajmuje to sporo czasu i wysiłku, ale nadal
apt-get
pokazuje kilka błędów.źródło
Za mało rep, aby skomentować : @exic / @mark, zauważyłem, że używa on znaku wstecznego na początku nazwy pakietu, a następnie znaku zapytania, dlatego należy sprawdzić inną interpunkcję. Nie jestem pewien, czy to było powiązane. Moje rozwiązanie:
źródło
Skopiuj na przykład komunikat o błędzie do pliku
111.txt
. Następnie uruchom polecenieźródło
Wszystkie pozostałe odpowiedzi tutaj zakładają, że chcesz ponownie zainstalować pakiety. W moim przypadku nie chciałem tego robić. Użyłem
locate
, aby spróbować usunąć wszystkie ślady z nich w tym ich apt listy plików.Pierwszym krokiem jest upewnienie się, że pakiety zostały usunięte za pomocą menedżera pakietów:
Następnie apt ma polecenie, które możesz uruchomić, aby je wyczyścić. Spowoduje to usunięcie ostrzeżenia, pozostawiając pakiety odinstalowane:
Źródło na Ask Ubuntu: brak pliku listy plików dla pakietu
źródło
Używam systemu operacyjnego deepin linux, zmieniłem powyższe polecenia do pracy. Używam języka chińskiego.
for package in $(sed "s/.*\ \(.*\)\ .*/\1/" error.txt); do apt-get install -y --reinstall "$package"; done
jeśli używasz angielskiegofor package in $(sed "s/.*'\(.*\)'.*/\1/" error.txt); do apt-get install -y --reinstall "$package"; done
źródło
Nigdy nie działało żadne z powyższych poleceń, ale w końcu zadziałało to po wysłaniu komunikatu o błędzie do pliku error.txt
Mam nadzieję, że to pomaga komuś innemu.
źródło