Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

while installing any softwere or update i am getting this error

installArchives() failed: dpkg: error: parsing file '/var/lib/dpkg/available' near line 0:

 field name `/usr/share/gnome/help-langpack/gedit/sl/gedit-plugins-modelines.page' must be followed by colon
share|improve this question

1 Answer 1

For some reasons the file /var/lib/dpkg/available is damaged.

Move it away, for example with

sudo mv /var/lib/dpkg/available /var/lib/dpkg/available.bak

If there is a file /var/lib/dpkg/available-old try if this one works:

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

If installing software works now you are done.

If it still doesn't work run

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

to create a new file.

share|improve this answer
    
Thanks i used last option to create new file and everything is ok now thanks a lot –  Amol Jan 25 '12 at 18:32
    
Copying the old file worked fine for me - many thanks. –  Alec Sep 27 '12 at 13:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.