上次运行更新管理器时,我收到有关软件包损坏的错误。我进入 Synaptic 发现它是 Cardapio 菜单替代品。我完全删除了与其相关的所有软件包,然后尝试重新安装。我收到此错误:
E: /var/cache/apt/archives/cardapio-gnomepanel_0.9.179-ubuntu1-maverick1_i386.deb: 尝试覆盖“/usr/bin/cardapio-gnome-panel-applet”,它也位于软件包 cardapio 0.9.180-ubuntu1-maverick1 中
我搜索了 AU 并找到了类似的问题. 这个问题的解决办法已经找到了这里。
我尝试按照这些说明操作,首先使用 force-overwrite 标志,当它不起作用时,使用 force-all 标志。force-all 似乎有效,但当我尝试运行更新时,仍然出现错误。这是整个终端会话;有人能帮我吗?
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
Reading package lists... Done
Building dependency tree
Reading state information... Done
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)
答案1
终于可以正确安装了。我需要将所有软件包标记为从 Synaptec 中完全删除,然后通过 Ubuntu Tweak 删除原始 PPA,然后使用项目页面。
sudo add-apt-repository ppa:cardapio-team/unstable && sudo apt-get update && sudo apt-get install cardapio
答案2
确保您已更新软件源(可能需要继续检查,因为有时由于构建队列或故障,ppas 在更新时没有完全更新)。
我的第一个建议应该工作,即使你说它过去不起作用。当然是:
sudo apt-get install cardapio*
sudo dpkg -i --force-all /var/cache/apt/archives/*cardap*.deb
- 它应该从那里安装所有相关的包并忽略覆盖的尝试。
如果这不起作用,请记下有问题的文件并将其删除:
sudo rm /path/to/file/be/careful/with/it
然后运行命令来安装出现错误的包:
sudo dpkg -i --force-all /var/cache/apt/archives/nameofpackage.deb
注意:在这种情况下,您必须具体说明,因为我在第一种方法中使用的通配符会导致有问题的包再次尝试写入同一个文件。
如果仍然拒绝安装,那么您可以手动提取 .deb 文件来执行更新,直到 cardapio 的 ppa 得到更新 :)。
附言 我在 64 位上,可能你在 32 位上,并且 ppa 不是最新的;因为我能够很好地更新 Cardapio。