0

I am getting this error when running sudo apt-get upgrade:

Fetched 322 MB in 1min 57s (2,741 kB/s)                                        
Extracting templates from packages: 100%rade
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
dpkg: warning: files list file for package 'indicator-printers' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'account-plugin-google' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ippusbxd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'account-plugin-facebook' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libc-ares2:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
1
  • I also have same error while upgrading. Have you find the solution. – chetan sharma Jan 7 at 8:01
0

This can happen when certain files become corrupted or are provided in an incomplete state. You'll need to move the following files (if they exist) to another location, at least temporarily:

/var/lib/dpkg/info/libc-ares2:amd64.postrm
/var/lib/dpkg/info/libc-ares2:amd64.list

Then run:

sudo dpkg --configure -a
sudo apt update
sudo apt upgrade

This should resolve the main issue.

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