6

While updating Ubuntu 14.04, I came across the following error message:

The following packages have unmet dependencies:
 collada-dom-dev : Depends: collada-dom2.4-sp-dev but it is not installed
 collada-dom2.4-sp : Depends: collada-dom2.4-sp-dev but it is not installed
E: Unmet dependencies. Try using -f.

Any help would be greatly appreciated.

Edit:

After it fails to install the missing package, using:

sudo apt-get -f install

I get this message:

Unpacking collada-dom2.4-sp-dev (2.4.4.1-ubuntu1~trusty1) ... 
dpkg: error processing archive /var/cache/apt/archives/collada-dom2.4-sp-dev_2.4.4.1-ubuntu1~trusty1_i386.deb (--unpack):
 trying to overwrite '/usr/lib/cmake/collada_dom-2.4/collada_dom-config.cmake', which is also in package collada-dom2.4-dp-dev 2.4.4.0-ubuntu1~trusty1 
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) 
Errors were encountered while processing:
 /var/cache/apt/archives/collada-dom2.4-sp-dev_2.4.4.1-ubuntu1~trusty1_i386.deb 
E: Sub-process /usr/bin/dpkg returned an error code (1)
agold
  • 132
  • 'Try using -f' so: sudo apt-get install -f – Cornelius Dec 21 '15 at 20:30
  • 1
    I tried that, and I was prompted to install the missing program/package, but it never installs no matter how many times I try. – Michael Roberts Dec 21 '15 at 20:34
  • After it fails to install the missing package, I get this message: – Michael Roberts Dec 21 '15 at 20:35
  • Unpacking collada-dom2.4-sp-dev (2.4.4.1-ubuntu1~trusty1) ... dpkg: error processing archive /var/cache/apt/archives/collada-dom2.4-sp-dev_2.4.4.1-ubuntu1~trusty1_i386.deb (--unpack): trying to overwrite '/usr/lib/cmake/collada_dom-2.4/collada_dom-config.cmake', which is also in package collada-dom2.4-dp-dev 2.4.4.0-ubuntu1~trusty1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/collada-dom2.4-sp-dev_2.4.4.1-ubuntu1~trusty1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) – Michael Roberts Dec 21 '15 at 20:35

6 Answers6

6

Moving aside the sources.list.d seems to be a fix that may not be desirable, and may actually not fix the root problem. Especially if there are sources in there that you actually want to keep. I think this is the better answer: dpkg error: "trying to overwrite file, which is also in..."

For this particular problem I used:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/collada-dom2.4-sp-dev_2.4.4.1-ubuntu1~trusty1_amd64.deb

Note: you'll want to replace the .deb file with the one your system is complaining about. Still don't know what is actually causing this problem with updates today...?

colby
  • 61
  • in simple words the system gets confused as you already have the similar or the same package that you're trying to install in your system which you most likely installed manually using sudo priveleges, it wasn't installed from official repos or ppas that's why usually this incident occurs. When you install packages manually from .deb file or any other you should clearly understand what you are doing/installing to avoid these incidents in the future. – JoKeR Dec 23 '15 at 09:28
3

This seems to be related to ROS, the Robot Operating System, the main user of Collada. It may be a problem with having both ROS-Indigo and Ros-Jade (different versions) installed. After doing the suggested

sudo dpkg -i --force-overwrite /var/cache/apt/archives/collada-dom2.4-sp-dev_2.4.4.1-ubuntu1~trusty1_amd64.deb

to unjam the package system, I did a "sudo apt-get autoremove", which removed lots of old ROS-Indigo stuff. After that, "sudo apt-get check" showed no errors.

John Nagle
  • 181
  • 6
2

I solved the problem. Apparently, I had third party repositories which were causing the problem. I removed them with the following:

sudo mv /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bk/
sudo mkdir /etc/apt/sources.list.d/

I then ran sudo apt-get install -f

s3lph
  • 14,314
  • 11
  • 59
  • 82
0

Answer proposed by @colby worked for me. Had to do

sudo apt-get -f install    

afterwards.

Thomas
  • 1
  • 1
0

Remove the Package: sudo apt-get remove collada-dom2.4-sp

baz
  • 1
0

I had the same problem under 14.04 LTS after I did a "sudo apt-get dist-upgrade". The cause apparently was some old linux headers and kernels that needed to be purged. The solution in my case was "sudo apt-get -f autoremove".

LLW
  • 1