Absolutely Tech

[SOLVED] Error ‘dpkg: error processing <filename> (--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!

Category: How-To, Ubuntu (Linux)

Tagged: , , , , , , , ,

  • Mell

    Hi, where do you type in the command:

    sudo dpkg -i –force-overwrite
    sudo apt-get -f install

    Please answer me ASAP because Cydia won’t install any of my updates and I need your help :(

  • Mell

    Hi, where do you type in the command:

    sudo dpkg -i –force-overwrite
    sudo apt-get -f install

    Please answer me ASAP because Cydia won’t install any of my updates and I need your help :(

  • http://www.techmindz.com Deepak Mittal

    You need to execute the commands in terminal.

  • http://www.techmindz.com Deepak Mittal

    You need to execute the commands in terminal.

  • Mell

    Yeah but where do I download it since i can’t download anything on cydia?

  • Mell

    Yeah but where do I download it since i can’t download anything on cydia?

  • http://www.techmindz.com Deepak Mittal

    As far as my know, Cydia has something to do with iPhone. In that case, I would not be able to help you.
    This tutorial is only for debian based linux distros. You may try searching for a terminal and if you find one, you can execute the commands over there.

  • http://www.techmindz.com Deepak Mittal

    As far as my know, Cydia has something to do with iPhone. In that case, I would not be able to help you.
    This tutorial is only for debian based linux distros. You may try searching for a terminal and if you find one, you can execute the commands over there.

  • http://indlovu.wordpress.com/2010/08/06/how-to-force-overwrite-virtually-anything/ How to force-overwrite virtually anything. « U8UNTU eLXER
  • Daniel

    umm i have somthing called ifile can i use that two and if so where do i go to put in the code?please help.

  • Daniel

    umm i have somthing called ifile can i use that two and if so where do i go to put in the code?please help.

  • http://www.techmindz.com Deepak Mittal

    Sorry, I didn’t get what you meant.

  • http://www.techmindz.com Deepak Mittal

    Sorry, I didn’t get what you meant.

  • Caue Rego

    this is what actually worked for me:

    dpkg -r “com.appname.appname”
    or if that fails

    dpkg –purge “com.appname.appname”
    “com.appname.appname” <—- name of the app u want to install replace this with ur own

  • Lucky Altsu

    you are genius, thank you so much!

  • http://www.absolutelytech.com Deepak Mittal

    You’re welcome :)

  • Blackey

    i love you.

  • Erwin Vd Glind

    Thanx m8 that is awesome! You helped me alot!

  • Rachot Moragraan

    over a year later and this still works! thanks!

  • Ben Nichols

    Thanks so much; just spent ages searching for a solution to this problem with libprocesscore4b, and it worked! Thanks!

  • Anonymous

    Ya it helps thanks buddy

Ubuntu 11.04

The next version of Ubuntu is coming soon

Follow me

Sponsors