例如Atom文本编辑器。当我跑步时:
sudo apt-get install imagemagick # http://www.imagemagick.org/script/index.php
给出:
you might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies: virtualbox-5.0:i386 : Depends: psmisc:i386 but it is not going to be installed
所以,那么当我尝试:
sudo apt-get -f install
我懂了
The following packages were automatically installed and are no longer required:
libgtkspell0 pidgin-data
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
psmisc:i386
The following packages will be REMOVED:
atom gconf2 psmisc
The following NEW packages will be installed:
psmisc:i386
我的问题是:当我尝试安装完全不同的东西时,为什么应该卸载Atom?
编辑:重复该过程但
apt-get autoremove
代替
sudo apt-get -f install
解决了这个问题。
但是我仍然不明白为什么不需要的程序包会触发我真正需要的程序包的移除(原子)
发生这种情况是因为apt中的每个程序包都有一个依赖项列表,您可以通过以下方式查看:
apt-cache depends libgtkspell0 pidgin-data atom
为了保留apt的建议,建议您删除atom,它的依赖关系与atom具有的依赖关系之一冲突。特别注意:
Conflicts: libgtkspell0:i386
输出的一部分。
因此,apt只是试图解决冲突。可能有人注意到,向两个要删除的软件包的打包者发布问题几乎是值得的,因为从理论上说,apt应该提供删除不再需要的软件包的信息,而不是系统中处于活动状态的软件包,但这始终是一个问题。平衡在程序包池中创建和维护依赖项/冲突列表。
如果我猜到了,我猜内部在创建apt依赖列表时,apt实际上并没有真正区分被删除包和活动包的方法,因此它只是选择负数最少的结果(即,强制删除一揽子)的结果。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句