# Error updating Cardapio

During my last run of the update manager, I got an error about a broken package. I went into Synaptic and found that it was the Cardapio menu replacement. I completely removed all packages relating to it, then tried to reinstall. I got this error:

E: /var/cache/apt/archives/cardapio-gnomepanel_0.9.179-ubuntu1-maverick1_i386.deb: trying to overwrite '/usr/bin/cardapio-gnome-panel-applet', which is also in package cardapio 0.9.180-ubuntu1-maverick1

I searched AU and found a similar issue. The solution to that problem was found here.

I tried following those instructions, first using the force-overwrite flag, and when that didn't work, the force-all flag. force-all seemed to work, but when I tried running update, I'm still getting errors. Here's the entire terminal session; can anyone help me out?

esther@esther-linux:~$sudo dpkg -i --force-all /var/cache/apt/archives/cardapio-gnomepanel_0.9.179-ubuntu1-maverick1_i386.deb (Reading database ... 184583 files and directories currently installed.) Preparing to replace cardapio-gnomepanel 0.9.179-ubuntu1-maverick1 (using .../cardapio-gnomepanel_0.9.179-ubuntu1-maverick1_i386.deb) ... Unpacking replacement cardapio-gnomepanel ... dpkg: cardapio-gnomepanel: dependency problems, but configuring anyway as you requested: cardapio-gnomepanel depends on cardapio; however: Package cardapio is not installed. Setting up cardapio-gnomepanel (0.9.179-ubuntu1-maverick1) ... esther@esther-linux:~$ sudo apt-get install -f
Building dependency tree
Correcting dependencies... Done
The following extra packages will be installed:
cardapio
The following NEW packages will be installed:
cardapio
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/460kB of archives.
After this operation, 2,474kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 184583 files and directories currently installed.)
Unpacking cardapio (from .../cardapio_0.9.180-ubuntu1-maverick1_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/cardapio_0.9.180-ubuntu1-maverick1_i386.deb (--unpack):
trying to overwrite '/usr/bin/cardapio-gnome-panel-applet', which is also in package cardapio-gnomepanel 0.9.179-ubuntu1-maverick1
Errors were encountered while processing:
/var/cache/apt/archives/cardapio_0.9.180-ubuntu1-maverick1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

-

Finally got it to install correctly. I needed to mark all packages for complete removal from Synaptec, then remove the original PPA via Ubuntu Tweak, then reinstall the PPA using the instructions on the project page.

sudo add-apt-repository ppa:cardapio-team/unstable && sudo apt-get update && sudo apt-get install cardapio

-
you were using the old ppa? –  RolandiXor Jun 7 '11 at 2:03
I was using whatever ppa was available when I first installed it. –  EmmyS Jun 7 '11 at 14:08
that was an old PPA I think :P - they changed their PPA recently, and it caused some issues. –  RolandiXor Jun 7 '11 at 14:33

Ensure you have updated your software sources (might need to keep checking, because sometimes ppas are not fully up to date at the time of updating, due to build queues or failures).

My first suggestion should work, even though you said it didn't work in the past. It is of course:

1. sudo apt-get install cardapio*
2. sudo dpkg -i --force-all /var/cache/apt/archives/*cardap*.deb
3. It should install all related packages from there and ignore the attempt to overwrite.

If this does not work, note the offending file, and delete it:

• sudo rm /path/to/file/be/careful/with/it

And then run the command to install the package that gives you the error:

• sudo dpkg -i --force-all /var/cache/apt/archives/nameofpackage.deb

NB: In this case, you have to be specific, since the wild card I used in the first method would cause the offending package to just try to write the same file again.

If it still refuses to install, then you could manually extract the .deb files to perform the update, until of course cardapio's ppa gets updated :).

P.S. I'm on 64bit, and it may be that you are on 32bit and the ppa is not up to date; because I was able to update Cardapio just fine.

-
Thanks for the detailed instructions, but I get an error in step 1. After tons of Gets and unpacking, I get the following: Processing triggers for python-support ... Errors were encountered while processing: /var/cache/apt/archives/cardapio_0.9.180-ubuntu1-maverick1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) –  EmmyS Jun 7 '11 at 0:35