In the past few days, Ubuntu12.04 had just arrived and had a fun trip. When the software was installed, it was canceled. When the software center was opened later, an error occurred. How can this problem be solved later, failed to install any software. error message: dpkg: failedtoopenpackageinfofile '/var/lib/dpkg/available' forreading: NosuchfileordirectoryE: Sub-process/u
In the past few days, Ubuntu 12.04 has just been released and has been playing a game. During the software installation process, it has been canceled, and an error occurs when the Software Center is opened later: how can this problem be solved, failed to install any software. The error message is as follows:
Dpkg: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directoryE: sub-process/usr/bin/dpkg returned an error code (2)
Then we found the solution:
First:
Sudo cp/var/lib/dpkg/available-old/var/lib/dpkg/available
I tried this method and it does not work for me. It may be that I have deleted the available-old directory.
Second:
Run sudo dpkg -- clear-avail first.
Run sudo apt-get update again.
OK. After using the second method, you can use apt-get-install to install the software normally.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2