
答案1
簡短的回答是:
aptitude remove '~sX11 ! ~Rbeaglebone'
然而在這種情況下(有一個很多依賴 X11 的東西!要執行此操作,請將選項--schedule-only
添加到上面,然後在aptitude
不帶參數的情況下再次運行。-o Aptitude::Auto-Fix-Broken=false
它我可以看到只有當您g按下介面。
執行 ncurses 介面後,按e檢查第一個解決方案並查看其他刪除內容。如果您看到任何不想要的內容,請使用箭頭鍵選擇它,然後按r拒絕該操作。按.加載下一個解決方案,它現在應該提供一個不包含任何您拒絕的解決方案。根據需要重複並按!接受解決方案並正常繼續。
答案2
我相信您可以使用以下方法之一來“排除”套件“beaglebone”,這將強制保留其任何依賴項。
$ sudo apt-mark hold <package>
或者
$ echo <package> hold | sudo dpkg --set-selections
第一個利用apt-mark
其hold
特點。
hold
hold is used to mark a package as held back, which will prevent the
package from being automatically installed, upgraded or removed. The
command is only a wrapper around dpkg --set-selections and the state
is therefore maintained by dpkg(1) and not affected by the --file
option.
第二個用於dpkg
將包標記為“保留”。
--set-selections
Set package selections using file read from stdin. This file should
be in the format 'package state', where state is one of install,
hold, deinstall or purge. Blank lines and comment lines beginning
with '#' are also permitted.