I had a similar error, but the problem was not in dpkg.status
, but in an apt listing.
To check the likely cause, run strace -efile apt install something
. Then look for the last files accessed before the error message shows:
stat("/var/lib/apt/lists/linux.dropbox.com_ubuntu_dists_xenial_main_i18n_Translation-en%5fUS.uncompressed", 0x7fffd2f39d00) = -1 ENOENT (No such file or directory)
stat("/var/lib/apt/lists/linux.dropbox.com_ubuntu_dists_xenial_main_i18n_Translation-en%5fUS", 0x7fffd2f39e50) = -1 ENOENT (No such file or directory)
stat("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_InRelease", 0x7fffd2f39d10) = -1 ENOENT (No such file or directory)
stat("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_Release", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_InRelease", 0x7fffd2f396d0) = -1 ENOENT (No such file or directory)
stat("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_Release", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=57344, ...}) = 0
open("/tmp/fileutl.message.XlglFW", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
unlink("/tmp/fileutl.message.XlglFW") = 0
open("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_Release", O_RDONLY) = 6
open("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_Release", O_RDONLY) = 5
stat("/var/lib/apt/lists/www.fossology.org_releases_2.6.2_Ubuntu_dists_14.04_Release", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
Reading package lists... Done
E: The package lists or status file could not be parsed or opened.
+++ exited with 100 +++
In my case, the last file (a Release
file from fossology) turned out to be 0 bytes long. Removing that repository enabled apt to resume normal functionality