dpkg: failed to open package into file '/var/lib/dpkg/available' for reading: no such file or directory

Asked by Neil Johnson

When I try to do "Updates" I get this message. What should I do?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Hope this helps

Revision history for this message
Avinash Raj (avistylein3105) said :
#2

    dpkg: error: failed to open package info file `/var/lib/dpkg/available' for reading: No such file or directory

The above error clearly shows that the file `available` in the directory `/var/lib/dpkg` is missing.Don't worry about that. There would be a backup for all the files inside `var/lib/dpkg` directory is located on the same directory itself. So just renaming or copying the backup file would solve your problem.

    sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

This will creates a new file called `available` on the same directory.Please note that `dpkg` will only look for the file `/var/lib/dpkg/available` and not `/var/lib/dpkg/available-old`.

Can you help with this problem?

Provide an answer of your own, or ask Neil Johnson for more information if necessary.

To post a message you must log in.