Ubuntu: /var/lib/dpkg/available MISSING



Question:

I get the error message:

/var/lib/dpkg/available missing.  

That is a problem, I realize, as it is not possible to download or update anything at all. Not keen on installing a new system - how is this fixable?

Thanks in advance.


Solution:1

Usually this error is harmless. If you still want to recreate /var/lib/dpkg/available with the contents, open a terminal and type:

sudo touch /var/lib/dpkg/available  sudo sh -c 'for i in /var/lib/apt/lists/*_Packages; do dpkg --merge-avail "$i"; done'  

From man dpkg:

--merge-avail        With  action  --merge-avail,  old   information   is  combined   with  information  from  Packages-file  


Solution:2

I have removed my /var/lib/dpkg/available via

sudo rm /var/lib/dpkg/available  

and an installation is possible.

Simply run the commands below:

sudo apt-get install dselect  sudo dselect update  

If the installation isn't possible, download the dselect package from here and install the package via the command below. I have used the 64-bit version for Trusty in my example

cd  wget http://mirrors.kernel.org/ubuntu/pool/main/d/dpkg/dselect_1.17.5ubuntu5.4_amd64.deb  sudo dpkg -i dselect_1.17.5ubuntu5.4_amd64.deb  

The steps via

sudo dpkg --clear-avail  sudo apt-get update  

doesn't recreates the content in /var/lib/dpkg/available in my case


From man dpkg

--clear-avail      Erase the existing information about what packages are available.  

From man dselect

update      Refresh the available packages database.  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »