Ubuntu
無法安裝軟體包。有沒有辦法自動安裝依賴項?
我使用 Ubuntu 14.04。我正在嘗試安裝需要一些依賴文件的 dpkg-dev 。
bin$ sudo apt-get install dpkg-dev Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5) but 1.17.5ubuntu5.6 is to be installed Recommends: build-essential but it is not going to be installed Recommends: fakeroot Recommends: libalgorithm-merge-perl but it is not going to be installed E: Unable to correct problems, you have held broken packages.
之後,我正在執行以下操作,建議安裝所有依賴項,需要之前的安裝。
bin$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libsdl-image1.2 libtar0 libva-x11-1 libxcb-composite0 libxcb-xv0 vlc-plugin-notify vlc-plugin-pulse Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
這無法完成這項工作。請推荐一種克服這個障礙的方法。提前致謝。
- 更新軟體包列表,看看是否修復它。
- 使用其他工具
aptitude
,例如手動選擇版本,並解決衝突。UI 需要一些時間來適應,但拯救搞砸的依賴關係非常棒。