dpkg: advertencia: falta el archivo de la lista de archivos para el paquete 'x'


20

Recibo esta advertencia para varios paquetes cada vez que instalo o realizo algún paquete apt-get upgrade. No estoy seguro de qué lo está causando; es una nueva instalación de Debian en mi servidor OpenVZ y no he cambiado ninguna configuración de dpkg.

Aquí hay un ejemplo:

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

Todo funciona bien, pero estos mensajes de advertencia son bastante molestos. ¿Alguien sabe como puedo arreglar esto?

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

Salida agregada a la pregunta.
Mark

¿Intentaste un simple apt-get update?
Ben Lessani - Sonassi

Sí, he instalado muchos paquetes y ejecuté la actualización varias veces.
Mark

Respuestas:


18

Lo arregló reinstalando los archivos que aparecieron allí. Por lo tanto, es posible que desee probar algo como esto:

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

Copiar y pegar amigable en una línea:

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

Tenga en cuenta que ejecutar este comando lleva algún tiempo , a medida que avanzamos por cada paquete.

En algunos casos apt upgradeno muestra los errores, por lo tanto, puede reinstalar un paquete (por ejemplo, x) que da el error y ejecutarlo así:

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'. No es bueno en bash; ¿podrías arreglarlo?
Mark

Mark: Está bien aquí, ¿podría ser que te perdiste el comienzo forde la línea anterior?
exic

Lamentablemente, esto no hace nada por mí mientras se ejecuta al mando. Pero me encanta la idea
Jamie Hutber

1
el script no funcionó, sin embargo, la idea de reinstalar hizo el truco sudo apt-get install --reinstall "package name"
AllGamer

primera ejecución y sudo bashluego pegar script
Soliman

7

La respuesta anterior no me funcionó por completo. Un par de paquetes, a saber, libc6, todavía mostraban este error.

Encontré una solución en un foro. El error es que la nueva versión de libc no se hizo eco de la lista de archivos para corregir el archivo. En lugar de repetirlo, /var/lib/dpkg/info/libc6:amd64.listlo hizo/var/lib/dpkg/info/libc6.list

Se puede solucionar ejecutando (ajuste para su última versión y arco de 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

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

Buena suerte a quien lea esto en el futuro y lo encuentre utilizable.


No funciona, si dpkg-deb -c /var/cache/apt/archives/libc6_2.13-38_amd64.debtiene entradas con enlaces simbólicos, por ejemplo, dpkg-deb -c /var/cache/apt/archives/mc_3%3a4.8.13-3_amd64.deb | grep mc.cshdevuelve./usr/share/mc/bin/mc.csh -> ../../../lib/mc/mc.csh
AB

@AB no lo sabría. Abandoné Debian y fui completamente a FreeBSD donde pude.
dzhi

2

Intenta guardar este script:

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

Luego, ejecútalo con

sudo /bin/bash ./scriptname

Esto tomó un poco de trabajo extra y algunos otros comandos también, como

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

junto con la eliminación y reinstalación de algunos paquetes específicos.

Esto lleva un poco de tiempo y esfuerzo, aunque aún apt-getmostrará algunos errores.


1

No hay suficiente representante para comentar : @exic / @mark, descubrí que usa una marca de retroceso al comienzo del nombre del paquete y una comilla después, por lo tanto, es necesario verificar diferentes puntuaciones. No estoy seguro de si esto estaba relacionado. Mi solución:

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

0

Copie el mensaje de error a un archivo, por ejemplo 111.txt. Luego ejecuta el comando

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

Todas las otras respuestas aquí suponen que desea volver a instalar los paquetes. En mi caso, no quería hacerlo. Solía locatetratar de eliminar todos los rastros de ellos, incluidas sus listas de archivos apt.

El primer paso es asegurarse de que los paquetes se eliminen utilizando el administrador de paquetes:

sudo apt remove <package list>

Entonces apt tiene un comando que puede ejecutar para limpiarlo. Esto eliminará la advertencia mientras deja los paquetes desinstalados:

sudo apt autoclean

Fuente en Ask Ubuntu: falta el archivo de lista de archivos para el paquete


desafortunadamente esto no funcionó para mí :(
Hayden Thring

@HaydenThring ¿Qué paquete te está causando problemas?
Stephen Ostermiller

Hay un montón.
Hayden Thring

Edité la respuesta: primero debes asegurarte de eliminarlos
Stephen Ostermiller

0

Utilizo el sistema operativo Deepin Linux, cambié los comandos anteriores para que funcionen. Yo uso el idioma chino for package in $(sed "s/.*\ \(.*\)\ .*/\1/" error.txt); do apt-get install -y --reinstall "$package"; done si usas ingles

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


-1

Nunca funcionó ninguno de los comandos anteriores, pero esto finalmente funcionó para mí después de enviar el mensaje de error al archivo error.txt

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

Espero que ayude a alguien más.

Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.