[SOLVED] Error ‘dpkg: error processing (–unpack) trying to overwrite…

Recently I got this error after installing VLC on Ubuntu 10.10 Maverick Meerkat. Not really remembering what caused the error to be triggered in the first place, it became very difficult to find a solution for it.
When I executed sudo apt-get upgrade to upgrade my packages, it told me there was some issues and I needed to execute sudo apt-get -f install to fix them. I did as advised but it produced the following error:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following extra packages will be installed:
vlc vlc-nox
Suggested packages:
mozilla-plugin-vlc videolan-doc
The following packages will be upgraded:
vlc vlc-nox
2 upgraded, 0 newly installed, 0 to remove and 198 not upgraded.
66 not fully installed or removed.
Need to get 0B/5,258kB of archives.
After this operation, 229kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
vlc vlc-nox
Install these packages without verification [y/N]? y
(Reading database … 206759 files and directories currently installed.)
Preparing to replace vlc 1.1.0-1~ppa1~maverick (using …/vlc_1.1.0-1ubuntu1_i386.deb) …
Unpacking replacement vlc …
dpkg: error processing /var/cache/apt/archives/vlc_1.1.0-1ubuntu1_i386.deb (–unpack):
trying to overwrite ‘/usr/lib/vlc/plugins/access/libxcb_screen_plugin.so’, which is also in package vlc-nox 1.1.0-1~ppa1~maverick
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Preparing to replace vlc-nox 1.1.0-1~ppa1~maverick (using …/vlc-nox_1.1.0-1ubuntu1_i386.deb) …
Unpacking replacement vlc-nox …
dpkg: error processing /var/cache/apt/archives/vlc-nox_1.1.0-1ubuntu1_i386.deb (–unpack):
trying to overwrite ‘/usr/lib/vlc/lua/playlist/anevia_streams.luac’, which is also in package vlc 1.1.0-1~ppa1~maverick
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/vlc_1.1.0-1ubuntu1_i386.deb
/var/cache/apt/archives/vlc-nox_1.1.0-1ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

After some time of googling and head-scratching, I finally found a solution and it wasn’t that difficult either.
To fix it just note down the path of files which are causing the trouble. From the above mentioned error, we can clearly see that there are these two files causing the error:

/var/cache/apt/archives/vlc_1.1.0-1ubuntu1_i386.deb
and
/var/cache/apt/archives/vlc-nox_1.1.0-1ubuntu1_i386.deb

You just forcefully overwrite them using the following command:

sudo dpkg -i --force-overwrite <filename>
sudo apt-get -f install

For the above two files you’d execute:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/vlc_1.1.0-1ubuntu1_i386.deb
sudo dpkg -i --force-overwrite /var/cache/apt/archives/vlc-nox_1.1.0-1ubuntu1_i386.deb
sudo apt-get -f install

This fixed the error for me and I hope this fixes it for you too.

Cheers!

Leave a comment

Your email address will not be published.