48

(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 -- https://launchpad.net/~fkrull/+archive/deadsnakes) and python-profiler

Unfortunately, these two packages both try to install /usr/lib/python2.5/profile.py 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?

Anwar
  • 76,649
UsAaR33
  • 736

1 Answers1

94

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.

source

Gus E
  • 1,736
  • 12
    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 02:42