0

As mentioned, cannot install packages. I tried to install VLC in package manager and there's an error message

installArchives() failed: Selecting previously unselected package libaribb24-0:amd64.
(Reading database ... 
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libstdc++-6-dev:amd64' contains empty filename

And basically any other packages also does this. And I tried to do this:

sudo rm /var/lib/dpkg/available 
sudo touch /var/lib/dpkg/available
sudo sh -c 'for i in /var/lib/apt/lists/*_Packages; do dpkg --merge-avail "$i"; done'
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

And no progress had been made, still the same error. In terminal after typing

sudo apt-get install vlc

I get this:

dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libstdc++-6-dev:amd64' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

So how do I solve it?

  • You may need to regenerate the corrupted file by downloading the .deb and extracting the list of files from it - see for example [I get this error: dpkg: unrecoverable fatal error, aborting: files list file for package `fonts-tlwg-kinnari' contains empty filename](https://askubuntu.com/a/648754/178692) – steeldriver Feb 19 '20 at 12:29

2 Answers2

0

Does clearing the cached copy of that package help?

apt-get clean doesn’t always do a proper job, especially with half-installed packages, or packages marked with installation. My suspicion is that the deb file for libstdc++ got corrupted somehow in /var/cache/apt... no harm in deleting it or moving it out of there to apt will re-download a fresh copy. You could always also download it yourself, manually, check its hash to make sure download was ok, then use dpkg -i xxx.deb to install it the old-fashioned way.

Another thing to try is this method of cache cleanup:

https://askubuntu.com/questions/648736/i-get-this-error-dpkg-unrecoverable-fatal-error-aborting-files-list-file-for

0

Go to your root file system and go to

/var/lib/dpkg/info/ 

Cut all of the files there and create a new file called info.bak under

/var/lib/dpkg

Paste all of the files you cut earlier into info.bak and that solved my problem