dpkg : 경고 : 'x'패키지의 파일 목록 파일이 없습니다.


20

나는 여러 패키지 I은 설치할 때마다이 경고를 얻을 수 있는 패키지 또는 수행을 apt-get upgrade. 무엇이 원인인지 확실하지 않습니다. 내 OpenVZ 서버에 새로운 데비안 설치이며 dpkg 설정을 변경하지 않았습니다.

예를 들면 다음과 같습니다.

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:~# 

모든 것이 잘 작동하지만이 경고 메시지는 꽤 성가시다. 누구든지 내가 어떻게 해결할 수 있는지 알고 있습니까?

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?
quanta

질문에 출력을 추가했습니다.
Mark

간단한 시도 했습니까 apt-get update?
Ben Lessani-Sonassi

예, 많은 패키지를 설치하고 여러 번 업데이트를 실행했습니다.
Mark

답변:


18

그는 거기에 나타난 파일을 다시 설치하도록 수정했습니다. 따라서 다음과 같이 시도해 볼 수 있습니다.

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

한 줄에 친절한 복사하여 붙여 넣기 :

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

모든 패키지를 순환 할 때이 명령을 실행하는 데 시간걸립니다 .

어떤 경우 apt upgrade에는 오류가 표시되지 않으므로 오류를 제공하고 다음과 같이 실행하는 하나의 패키지 (예 : x)를 다시 설치할 수 있습니다.

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

-bash: syntax error near unexpected token ``do'. 배쉬를 잘하지 못한다. 당신은 그것을 고칠 수 있습니까?
Mark

Mark : 괜찮습니다 for. 이전 줄 의 시작 부분 을 놓쳤을 수 있습니까?
exic

슬프게도 이것은 명령을 실행하는 동안 나를 위해 아무것도하지 않습니다. 하지만 저는 아이디어를 좋아합니다
Jamie Hutber

1
스크립트가 제대로 작동하지 않았지만 재설치 아이디어는 sudo apt-get install --repack "package name"
AllGamer

첫 실행 sudo bash후 스크립트 붙여 넣기
Soliman

7

위의 답변은 완전히 효과가 없었습니다. libc6과 같은 몇 가지 패키지가 여전히이 오류를 표시했습니다.

한 포럼에서 해결책을 찾았습니다. 버그는 새로운 버전의 libc가 파일 목록을 수정하여 파일을 수정하지 않았다는 것입니다. /var/lib/dpkg/info/libc6:amd64.list그것을 반향하는 대신에 반향을 일으킨다/var/lib/dpkg/info/libc6.list

다음을 실행하여 수정할 수 있습니다 (최신 버전 및 libc6 아치에 맞게 조정).

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

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

앞으로이 책을 읽고 쓸 수있는 사람에게 행운을 빕니다.


dpkg-deb -c /var/cache/apt/archives/libc6_2.13-38_amd64.deb기호 링크가있는 항목이있는 경우 작동하지 않습니다 ( 예 : dpkg-deb -c /var/cache/apt/archives/mc_3%3a4.8.13-3_amd64.deb | grep mc.cshreturn./usr/share/mc/bin/mc.csh -> ../../../lib/mc/mc.csh
AB

@AB 몰라요. 데비안을 버리고 가능한 한 어디에서나 FreeBSD를 사용했습니다.
dzhi

2

이 스크립트를 저장하십시오 :

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

그런 다음

sudo /bin/bash ./scriptname

이것은 약간의 추가 작업과 다른 명령도 필요했습니다.

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

특정 패키지 제거 및 재설치와 함께.

이것은 상당한 시간과 노력이 필요 apt-get하지만 여전히 몇 가지 오류가 표시됩니다.


1

@exic / @mark 에 대한 충분한 답변이 아닙니다 . 패키지 이름의 시작 부분에 백틱을 사용하고 그 뒤에 따옴표를 사용하므로 다른 문장 부호를 확인해야합니다. 이것이 관련이 있는지 확실하지 않습니다. 내 해결책 :

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

0

오류 메시지를 파일에 복사하십시오 (예 :) 111.txt. 그런 다음 명령을 실행하십시오.

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

다른 모든 답변은 패키지를 다시 설치한다고 가정합니다. 제 경우에는 그렇게하고 싶지 않았습니다. 나는 locate적절한 파일 목록을 포함하여 그 흔적을 모두 제거하려고 시도했습니다.

첫 번째 단계는 패키지 관리자를 사용하여 패키지를 제거하는 것입니다.

sudo apt remove <package list>

그런 다음 apt에는 명령을 실행하여 정리할 수 있습니다. 이렇게하면 패키지를 제거한 채로 경고를 제거 할 수 있습니다.

sudo apt autoclean

Ask Ubuntu의 소스 : 패키지 누락에 대한 파일 목록 파일


불행히도 이것은 나를 위해 일하지
않았다

@HaydenThring 어느 패키지가 문제를 일으키는가?
Stephen Ostermiller 2016 년

거기에 무리가 있습니다.
Hayden Thring

답을 편집했습니다. 먼저 제거해야합니다.
Stephen Ostermiller

0

나는 리눅스 운영 체제를 사용하고 위의 명령을 변경했습니다. 나는 중국어를 사용합니다. for package in $(sed "s/.*\ \(.*\)\ .*/\1/" error.txt); do apt-get install -y --reinstall "$package"; done 영어를 사용한다면

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


-1

위의 명령 중 어느 것도 작동하지 않지만 error.txt 파일로 오류 메시지를 출력 한 후 마침내 작동했습니다.

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

그것이 다른 누군가를 돕기를 바랍니다.

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.