1

I tried to install a package and it did, and it appears to work just fine. However when I installed it I got several warnings about packages being missing.

dpkg: warning files list file for package '...' missing, assuming package has no files currently installed.

Since it is just a warning and it appears to work anyway, I assumed that it doesn't matter, but I would like someone to confirm that.

The packages that are missing are ones that I uninstalled on purpose because they were non-essential and took up a lot of room.

EDIT: Package is tzdata. Using dpkg -i on a .deb file to install. And the above is essentially the entire warning. Just instead of ... it lists packages. python2.7-minimal, libsqlite3-0, libaprutill-dbd-sqlite3, python-minimal`

EDIT: "What exactly did you do?" I ran the command

dpkg -i tzdata_2017b-2_all.deb

to install the package tzdata.

"What did you want to achieve?" I wanted the package to install.

"What happened instead? Did you encounter any warning or error messages?" The package installed and worked fine. However, the above warning appeared for the above packages.

I cannot copy and paste since this is occurring on a separate server. But I will rewrite it here:

dpkg: warning files list file for package python2.7-minimal missing, assuming package has no files currently installed.
dpkg: warning files list file for package libsqlite3-0 missing, assuming package has no files currently installed.
dpkg: warning files list file for package libaprutill-dbd-sqlite3, assuming package has no files currently installed.
dpkg: warning files list file for package python-minimal, assuming package has no files currently installed.

I am not looking for a fix. I am just curious if dpkg giving me a warning in this type of situation actually matters. Again the program works anyway and nothing else on my system needed those packages.

| improve this question | | | | |
  • 2
    which package are you installing, how are you installing it, which platform are you ? edit your question and attach full error. – saviour123 Aug 25 '17 at 15:05
  • 1
    uh... what made you think those packages were non-essential? O.O Here's what APT will do if I remove python-minimal (removing all the packages that depend on python-minimal) How did you uninstall them? Apparently dpkg doesn't know about it – Zanna Aug 30 '17 at 8:30
  • Could you please add a little more detail? What exactly did you do, what did you want to achieve and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. (see How do I ask a good question?) – David Foerster Aug 30 '17 at 11:23
  • Possible duplicate of askubuntu.com/questions/715558/… – David Foerster Aug 30 '17 at 21:29
  • I have a similar output from a previous LibreOffice installation. I uninstalled a version included with the distro (Ubuntu) using apt, then downloaded a newer version as a .deb file and used dpkg -i to install. Since I don't want to re-install the previous version just to clear a warning, I saw another answer that eluded to .list files in the /var/lib/dpkg directory and found some under the subdirectory info related to LibreOffice. Now I'm just wondering if removing those will clear the issue, or will it disrupt my ability to use dpkg -r to remove the current version? – Chezzwizz Apr 12 '19 at 22:09
3

Have a look at this Serverfault question.

You might want to try something like this:

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

Copy/paste friendly in one line:

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

Be aware that running this command takes some time as it cycles through every package.

I wanted to suggest something similar to the accepted answer there before I found this. And I don't have enough reputation to add this as a comment.

Unfortunately I can't answer why this is happening. I had this problem after a dist-upgrade, and fixed it by reinstalling the packages.

| improve this answer | | | | |
  • I had seen this answer in other places. Although it might be correct to get rid of the warnings and reinstall the packages, I am looking for WHY it is happening and if it even matters. Since they are only listed as "warning" and not "severe warning" or "error", it appears to not be so serious. Again the package appears to be functioning just fine without these missing packages. – khm Aug 29 '17 at 11:08
  • @fronk I did do anything in my terminal.he answer did respond or didn't do anything. I copy the script and pasted in a file named ls.sh and tried to run using "sudo ./ls.sh". No outputs, nothing. – Pranav Jul 24 '19 at 12:02
  • thanx bro.. helped! – Jerrychayan Oct 2 '19 at 13:28
2

We had a RAID5 failure that seemed to come with some corruption of the dpkg list database so I encountered this problem recently, however the solution above didn't work, as apt-get install --reinstall xxx yielded more errors of dodgy list files. I did manage to resolve it in my case though, so here's the process I used.


In the end, the process that worked for me was to remove all the files corresponding to that package in the database, and reinstall after updating dpkg itself.

As an example, here's one such error:

dpkg: warning files list file for package antlr, assuming package has no files currently installed.

Which for me the solution was:

sudo mv /var/lib/dpkg/info/antlr* ~/var   # Backup in case of any other issues
                                          # Alternatively: sudo rm /var/lib/dpkg/info/antlr*

Then,

sudo dpkg --configure -a

The key seemed to be to run the configure command each time a package listing was removed (versus some other suggestions I've seen of nuking all the list files and then running apt-get update/upgrade).

Then finally, sudo apt-get install --reinstall antlr would complete correctly.

| improve this answer | | | | |
  • it did work on me. No "antlr" file/folder in the first place. – Pranav Jul 24 '19 at 12:04
  • You may not have that particular package. That was just an example. – Joe Healey Jul 25 '19 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.