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.

This question already has an answer here:

I'm trying to do apt-get install -f -o APT::Immediate-Configure=0 (just apt-get install -f doesn't work currently for me...) which fails with

Unpacking libboost1.46-dev (from .../libboost1.46-dev_1.46.1-7ubuntu3_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libboost1.46-dev_1.46.1-7ubuntu3_i386.deb (--unpack):
 trying to overwrite '/usr/include/boost/aligned_storage.hpp', which is also in package libboost1.40-dev 1.40.0-4ubuntu4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

and many similar errors.

There are similar questions (1, 2) already but the suggested solution is for dpkg and I don't know how to apply that to apt-get.

How can I resolve this?

share|improve this question
add comment

marked as duplicate by Danatela, Radu Rădeanu, Ask, karel, Avinash Raj Apr 16 at 11:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 1 down vote accepted

Well, I went with dpkg now but I tried to automate it a bit. My command looked like:

for f in $(sudo apt-get install python-gnupginterface -f | egrep "^ libboost" | cut -d: -f1); do echo $f; done | xargs sudo dpkg --purge

Then I did a dpkg --configure -a.

Then apt-get install -f.

Then apt-get autoremove.

share|improve this answer
add comment

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