Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed python2.7 on Ubuntu Lucid a couple of months ago through a PPA. Everything went fine and there was no problem. Yesterday, I upgraded from lucid to Ubuntu Precise and the upgrade went smoothly. Now, I need to install python2.7-dev and I get unment dependencies error:

sudo apt-get install python2.7-dev
The following packages have unmet dependencies:
 python2.7-dev : Depends: python2.7 (= 2.7.3-0ubuntu3.2) but 2.7.4-1+lucid1 is to be installed
                 Depends: libpython2.7 (= 2.7.3-0ubuntu3.2) but 2.7.4-1+lucid1 is to be installed
E: Unable to correct problems, you have held broken packages.

This is clearly caused by my old python2.7 that I installed on lucid. To fix that, I wanted to remove python2.7 and reinstall it (apt-get remove python2.7), but I realized it will remove a lot of packages and will install python3 instead. So I did not do that. How can I get rid of my old python2.7 and install a new one that works with Precise?

Note that my PPAs are all disabled.

share|improve this question
up vote 1 down vote accepted

The following command fixed the problem.

sudo apt-get install python2.7-minimal=2.7.3-0ubuntu3.2 python2.7=2.7.3-0ubuntu3.2 libpython2.7=2.7.3-0ubuntu3.2
share|improve this answer

Your Answer


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.