"reading files list for package 'inkscape': Input/output error" while trying to install packages [closed]

StackOverflow https://stackoverflow.com/questions/18602257

  •  27-06-2022
  •  | 
  •  

Question

It doesn't matter what I try to install using my package manager(sudo apt-get install whatever), I always get this error.

dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'inkscape': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

I have researched and have tried to rebuild my dpkg status file, and I have also tried to revert to an older version, but it either hasn't worked or I am doing it wrong.

Also, when I try to run the command "sudo apt-get update", I get this error.

The problem started when I lost my internet connection while downloading monodevelop. Any help is greatly appreciated.

Was it helpful?

Solution

I figured out the answer, so I will post it here in case anybody else has the same problem in the future.

NOTE: After this fix, apt-get no longer installs dependencies for me automatically without using the -f flag.

  1. Go into the /var/lib/dpkg directory
  2. Make a backup of the "status" file
  3. Open the status file as root and find the package that causes the error. In this case, its "PACKAGE: inkscape".
  4. Delete all the text until the next PACKAGE: declaration in the file.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top