Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 realize a similar question was asked before but the answers there don't handle these details)

I'm on Ubuntu 10.10 and need both python2.5 (coming from deadnsakes -- and python-profiler

Unfortunately, these two packages both try to install /usr/lib/python2.5/ so apt-get won't allow me to install both

Obviously this is a packaging bug, but I need this fixed asap. Is there anyway to completely ignore these errors and just blow out that file?

share|improve this question
It is not necessarily a bug: the two packages can be incompatible. – enzotib Aug 12 '11 at 6:23
up vote 35 down vote accepted

After python2.5 is installed try running:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install python-profiler

This should pass the --force-overwrite flag to the underlying dpkg instance which will tell dpkg to overwrite one package's file with anothers.


share|improve this answer
I should have mentioned that if you just have a .deb file, you can just run: sudo dpkg -i --force-overwrite python-profiler.deb – Gus E Aug 12 '11 at 2:42

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.