Files list file for package 'package' is missing final newline












0















To resolve this issue I have run these commands



sudo mv /var/lib/dpkg/info/<package name>.* /var/www
sudo apt-get install <package name>


But when I try to install any new packages or upgrade using the below command it gives errors for other packages.



What could have caused this problem and how can I resolve it?



$ sudo apt-get dist-upgrade
dpkg: warning: files list file for package 'libexpat1:amd64' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing;
assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
lxd lxd-client open-iscsi openssl tmux tzdata unattended-upgrades
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9806 kB of archives.
After this operation, 604 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get install --reinstall base-passwd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/47.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo chmod -R a+r /var/lib/dpkg/info
$ cd /var/lib/dpkg/info




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.* /var/www/html/




/var/lib/dpkg/info$ sudo apt-get install --reinstall libcap-ng0:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 11.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libcap-ng0 amd64 0.7.7-3.1 [11.1 kB]
Fetched 11.1 kB in 0s (39.2 kB/s)
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcap-ng0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcom-err2:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)


I have removed libcap-ng0:amd64 files from /var/lib/dpkg/info folder and later tried to reinstall it but now it has provided error for other package and warning for libcap-ng0.

It has occurred for rest packages in same way










share|improve this question




















  • 1





    Try using 'sudo apt-get -f install'

    – cloud.009
    Jan 2 at 20:22











  • Its not duplicate as i have already mentioned that i have tried the solution but its now occurring to other packages and has gone to infinite loop

    – insoftservice
    Jan 3 at 5:35











  • yes,But it did not worked for me.

    – insoftservice
    Jan 3 at 9:07











  • Thx for your answer but i am getting same o/p. dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting: files list file for package 'libcap-ng0:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

    – insoftservice
    Jan 3 at 12:22













  • did you move all the package list files? The command(s) you actually ran is not clear from your question. Please run sudo apt update and give the complete verbatim output formatted as code. I would expect that command to possibly fix your problem actually, but if not it may give some clue

    – Zanna
    Jan 3 at 17:40


















0















To resolve this issue I have run these commands



sudo mv /var/lib/dpkg/info/<package name>.* /var/www
sudo apt-get install <package name>


But when I try to install any new packages or upgrade using the below command it gives errors for other packages.



What could have caused this problem and how can I resolve it?



$ sudo apt-get dist-upgrade
dpkg: warning: files list file for package 'libexpat1:amd64' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing;
assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
lxd lxd-client open-iscsi openssl tmux tzdata unattended-upgrades
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9806 kB of archives.
After this operation, 604 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get install --reinstall base-passwd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/47.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo chmod -R a+r /var/lib/dpkg/info
$ cd /var/lib/dpkg/info




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.* /var/www/html/




/var/lib/dpkg/info$ sudo apt-get install --reinstall libcap-ng0:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 11.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libcap-ng0 amd64 0.7.7-3.1 [11.1 kB]
Fetched 11.1 kB in 0s (39.2 kB/s)
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcap-ng0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcom-err2:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)


I have removed libcap-ng0:amd64 files from /var/lib/dpkg/info folder and later tried to reinstall it but now it has provided error for other package and warning for libcap-ng0.

It has occurred for rest packages in same way










share|improve this question




















  • 1





    Try using 'sudo apt-get -f install'

    – cloud.009
    Jan 2 at 20:22











  • Its not duplicate as i have already mentioned that i have tried the solution but its now occurring to other packages and has gone to infinite loop

    – insoftservice
    Jan 3 at 5:35











  • yes,But it did not worked for me.

    – insoftservice
    Jan 3 at 9:07











  • Thx for your answer but i am getting same o/p. dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting: files list file for package 'libcap-ng0:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

    – insoftservice
    Jan 3 at 12:22













  • did you move all the package list files? The command(s) you actually ran is not clear from your question. Please run sudo apt update and give the complete verbatim output formatted as code. I would expect that command to possibly fix your problem actually, but if not it may give some clue

    – Zanna
    Jan 3 at 17:40
















0












0








0








To resolve this issue I have run these commands



sudo mv /var/lib/dpkg/info/<package name>.* /var/www
sudo apt-get install <package name>


But when I try to install any new packages or upgrade using the below command it gives errors for other packages.



What could have caused this problem and how can I resolve it?



$ sudo apt-get dist-upgrade
dpkg: warning: files list file for package 'libexpat1:amd64' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing;
assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
lxd lxd-client open-iscsi openssl tmux tzdata unattended-upgrades
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9806 kB of archives.
After this operation, 604 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get install --reinstall base-passwd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/47.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo chmod -R a+r /var/lib/dpkg/info
$ cd /var/lib/dpkg/info




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.* /var/www/html/




/var/lib/dpkg/info$ sudo apt-get install --reinstall libcap-ng0:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 11.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libcap-ng0 amd64 0.7.7-3.1 [11.1 kB]
Fetched 11.1 kB in 0s (39.2 kB/s)
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcap-ng0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcom-err2:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)


I have removed libcap-ng0:amd64 files from /var/lib/dpkg/info folder and later tried to reinstall it but now it has provided error for other package and warning for libcap-ng0.

It has occurred for rest packages in same way










share|improve this question
















To resolve this issue I have run these commands



sudo mv /var/lib/dpkg/info/<package name>.* /var/www
sudo apt-get install <package name>


But when I try to install any new packages or upgrade using the below command it gives errors for other packages.



What could have caused this problem and how can I resolve it?



$ sudo apt-get dist-upgrade
dpkg: warning: files list file for package 'libexpat1:amd64' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing;
assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing;
assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
lxd lxd-client open-iscsi openssl tmux tzdata unattended-upgrades
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9806 kB of archives.
After this operation, 604 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo apt-get install --reinstall base-passwd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/47.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcap-ng0:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)




$ sudo chmod -R a+r /var/lib/dpkg/info
$ cd /var/lib/dpkg/info




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.
libcap-ng0:amd64.list libcap-ng0:amd64.md5sums libcap-ng0:amd64.shlibs libcap-ng0:amd64.triggers




/var/lib/dpkg/info$ sudo mv libcap-ng0:amd64.* /var/www/html/




/var/lib/dpkg/info$ sudo apt-get install --reinstall libcap-ng0:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 11.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libcap-ng0 amd64 0.7.7-3.1 [11.1 kB]
Fetched 11.1 kB in 0s (39.2 kB/s)
dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-passwd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'bash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'debconf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'dash' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'coreutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'base-files' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'diffutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcap-ng0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'ncurses-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libcom-err2:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)


I have removed libcap-ng0:amd64 files from /var/lib/dpkg/info folder and later tried to reinstall it but now it has provided error for other package and warning for libcap-ng0.

It has occurred for rest packages in same way







apt package-management software-installation dpkg






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 13:25









Kulfy

4,19651341




4,19651341










asked Jan 2 at 19:39









insoftserviceinsoftservice

1012




1012








  • 1





    Try using 'sudo apt-get -f install'

    – cloud.009
    Jan 2 at 20:22











  • Its not duplicate as i have already mentioned that i have tried the solution but its now occurring to other packages and has gone to infinite loop

    – insoftservice
    Jan 3 at 5:35











  • yes,But it did not worked for me.

    – insoftservice
    Jan 3 at 9:07











  • Thx for your answer but i am getting same o/p. dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting: files list file for package 'libcap-ng0:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

    – insoftservice
    Jan 3 at 12:22













  • did you move all the package list files? The command(s) you actually ran is not clear from your question. Please run sudo apt update and give the complete verbatim output formatted as code. I would expect that command to possibly fix your problem actually, but if not it may give some clue

    – Zanna
    Jan 3 at 17:40
















  • 1





    Try using 'sudo apt-get -f install'

    – cloud.009
    Jan 2 at 20:22











  • Its not duplicate as i have already mentioned that i have tried the solution but its now occurring to other packages and has gone to infinite loop

    – insoftservice
    Jan 3 at 5:35











  • yes,But it did not worked for me.

    – insoftservice
    Jan 3 at 9:07











  • Thx for your answer but i am getting same o/p. dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting: files list file for package 'libcap-ng0:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

    – insoftservice
    Jan 3 at 12:22













  • did you move all the package list files? The command(s) you actually ran is not clear from your question. Please run sudo apt update and give the complete verbatim output formatted as code. I would expect that command to possibly fix your problem actually, but if not it may give some clue

    – Zanna
    Jan 3 at 17:40










1




1





Try using 'sudo apt-get -f install'

– cloud.009
Jan 2 at 20:22





Try using 'sudo apt-get -f install'

– cloud.009
Jan 2 at 20:22













Its not duplicate as i have already mentioned that i have tried the solution but its now occurring to other packages and has gone to infinite loop

– insoftservice
Jan 3 at 5:35





Its not duplicate as i have already mentioned that i have tried the solution but its now occurring to other packages and has gone to infinite loop

– insoftservice
Jan 3 at 5:35













yes,But it did not worked for me.

– insoftservice
Jan 3 at 9:07





yes,But it did not worked for me.

– insoftservice
Jan 3 at 9:07













Thx for your answer but i am getting same o/p. dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting: files list file for package 'libcap-ng0:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

– insoftservice
Jan 3 at 12:22







Thx for your answer but i am getting same o/p. dpkg: warning: files list file for package 'software-properties-common' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting: files list file for package 'libcap-ng0:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)

– insoftservice
Jan 3 at 12:22















did you move all the package list files? The command(s) you actually ran is not clear from your question. Please run sudo apt update and give the complete verbatim output formatted as code. I would expect that command to possibly fix your problem actually, but if not it may give some clue

– Zanna
Jan 3 at 17:40







did you move all the package list files? The command(s) you actually ran is not clear from your question. Please run sudo apt update and give the complete verbatim output formatted as code. I would expect that command to possibly fix your problem actually, but if not it may give some clue

– Zanna
Jan 3 at 17:40












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106373%2ffiles-list-file-for-package-package-is-missing-final-newline%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106373%2ffiles-list-file-for-package-package-is-missing-final-newline%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido