Ubuntu 19.04 apt 损坏的依赖项:单声道

瑞士辣椒

我在 ubuntu 19.04 上遇到 apt 问题。每次我尝试安装或升级 apt 包时,都会出现以下错误:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mono-complete : Depends: mono-roslyn (= 6.4.0.198-0xamarin3+ubuntu1804b1) but it is not going to be installed
 mono-devel : Depends: mono-roslyn (= 6.4.0.198-0xamarin3+ubuntu1804b1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

运行sudo apt -f install时遇到以下错误:

dpkg: error processing archive /var/cache/apt/archives/mono-roslyn_6.4.0.198-0xamarin3+ubuntu1804b1_all.deb (--unpack):
 trying to overwrite '/usr/bin/csc', which is also in package chicken-bin 4.13.0-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mono-roslyn_6.4.0.198-0xamarin3+ubuntu1804b1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

简而言之:mono-roslyn正在尝试覆盖csc当前由chicken-bin(CHICKEN 方案编译器)使用的二进制文件。

我尝试将csc二进制文件从/usr/bin/cscto移动/usr/bin/csc-chicken以检查是否可以解决问题。它没有,我仍然有同样的错误发生。

我以前遇到过关于 apt 和 mono 的问题,我用sudo apt autoremove, 修复了这个问题,这给了我与这里显示的第一个相同的错误。

我需要解决此问题,以便能够在我的系统上升级或安装新软件包。可以想象,这是一件相当紧迫的事情。

瑞士辣椒

几天后,我找到了解决方案。我决定只删除chicken-bin以便单声道可以正确安装(不理想,但我最好的选择)。正如我在我的问题中所说的apt remove那样不起作用,但我发现我可以使用dpkg.

以下命令解决了我的问题:

$ sudo dpkg --remove --force-remove-reinstreq chicken-bin
$ sudo apt -f install

希望其他人觉得这很有用。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章