Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Been trying to install git-core package for almost more than half a day now. Everytime i do, I get this error:

dpkg: error: parsing file '/var/lib/dpkg/available' near line 0:
newline in field name `../../../../../share/pyshared/UpdateManager/Core/__init__.py'

I've also tried running sudo apt-get update and sudo apt-get install --fix-missing. Even tried rebooting and cleaning the apt-get cache, still doesnt work.

share|improve this question
1  
Finally, a solution! – RolandiXor Feb 7 '12 at 2:37

1 Answer

up vote 23 down vote accepted

The problem is that your /var/lib/dpkg/available file is damaged.

This is not necessarily related to the git or git-core packages. Try to install any other package and they will fail too.

To fix this you have to delete/clear the file using the command:

sudo dpkg --clear-avail

then rebuild the file using the command:

sudo apt-get update

Now you should be able to install git and git-core.

share|improve this answer

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.