Page 1 of 1

[SOLVED] apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 4:29 am
by ozgta
Hi,
A new install of LMBE followed by # apt-get update && apt-get dist-upgrade
finishes with this error

Code: Select all

E: /var/cache/apt/archives/gstreamer0.10-plugins-bad_0.10.22-3_i386.deb: trying to overwrite '/usr/lib/gstreamer-0.10/libgstxvid.so', which is also in package gstreamer0.10-plugins-really-bad 0.10.22-0.1
How do I fix this?

Re: apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 7:17 am
by Oscar799
Moved here from the main forum

Re: apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 7:27 am
by viking777
Uninstall "really-bad" then run the updates again.

I only have "bad" installed and I don't notice any difference.

Once you are fully up to date you could always try and reinstall "really-bad" if you feel the need.

Re: apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 7:36 am
by Anakinholland
Hi ozgta,

I found this topic, which possibly holds this solution:

Code: Select all

cd /var/cache/apt/archives 
dpkg -i --force-overwrite <<all_package_names_listed_at_the_bottom_of_error_output>> 
dpkg --configure -a 
Replace "<<all_package_names_listed_at_the_bottom_of_error_output>>" with the package name that comes after "Errors were encountered while processing:". You may have to repeat the process a couple of times.

The explanation is in the same topic, but I'll paste it here for good order:
It forces the overwriting of a file that exists in another package(s) due to a packaging error. A file should only exist in one package at a time and every now and again someone makes a mistake and includes it two or more packages, therefore you need to use the --force-overwrite to get by it and install the new package(s).
Cheers,

Anakin

Edit: Viking's solution will most likely work as well, but it's a work-around :P

Re: apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 5:02 pm
by ozgta
Tried:
cd /var/cache/apt/archives
dpkg -i --force-overwrite <<all_package_names_listed_at_the_bottom_of_error_output>>
dpkg --configure -a
returns:

Code: Select all

dbmt nigel # cd /var/cache/apt/archives 
dbmt archives # dpkg -i --force-overwrite <<gstreamer0.10-plugins-bad_0.10.22-3_i386.deb>>
> 
Not sure if this the expected result as it didn't then allow me to run 'dpkg --configure -a'

So I uninstalled 'gstreamer0.10-plugins-bad_0.10.22-3_i386.deb' and running # apt-get update && apt-get dist-upgrade however I ended up with the same error message.
The original message mentions this package is also in 'gstreamer0.10-plugins-really-bad 0.10.22-0.1' I don't know if this has to be uninstalled also.

Code: Select all

E: /var/cache/apt/archives/gstreamer0.10-plugins-bad_0.10.22-3_i386.deb: trying to overwrite '/usr/lib/gstreamer-0.10/libgstxvid.so', which is also in package gstreamer0.10-plugins-really-bad 0.10.22-0.1

Re: apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 5:33 pm
by zerozero
ozgta,
after the update/dist-upgrade (when you get that error) try this:

Code: Select all

sudo dpkg -i --force-overwrite /var/cache/apt/archives/gstreamer0.10-plugins-bad_0.10.22-3_i386.deb
and then run dist-upgrade again;
report back.

Re: apt-get upgrade && apt-get dist-upgrade error

Posted: Sat Nov 26, 2011 8:24 pm
by ozgta
Perfect!
Many thanks zerozero