我正在 Ubuntu 12.04.5 LTS 機器上執行 apt-get 升級,該機器已經有一段時間沒有更新了,由於“設備上沒有剩餘空間”,升級失敗。過了一會兒,我發現空間意味著索引節點,我釋放了一些,但不幸的是事情有些歪斜。我嘗試過使用 dpkg -i 手動安裝提到的舊版本的軟體包,但這沒有幫助。
我嘗試過 apt-get Upgrade 和 apt-get -f install 無濟於事。結果如下。有什麼想法可以解決問題嗎?
固定的:
透過 dpkg -i 再次手動安裝早期版本,然後 apt-get -f install 就成功了。不知道為什麼這第一次不起作用。下面列出了有問題的軟體包,但它們可能會有所不同。
libssl1.0.0_1.0.1-4ubuntu5.14_i386.deb
linux-headers-3.2.0-64-generic-pae_3.2.0-64.97_i386.deb
linux-image-generic-pae_3.2.0.64.76_i386.deb
linux-headers-3.2.0-64_3.2.0-64.97_all.deb linux-headers-generic-pae_3.2.0.64.76_i386.deb
root@unlinked:/tmp# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run ‘apt-get -f install’ to correct these.
The following packages have unmet dependencies.
libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5.14) but 1.0.1-4ubuntu5.17 is installed
linux-generic-pae : Depends: linux-image-generic-pae (= 3.2.0.64.76) but 3.2.0.67.79 is installed
Depends: linux-headers-generic-pae (= 3.2.0.64.76) but 3.2.0.67.79 is installed
E: Unmet dependencies. Try using -f.
root@unlinked:/tmp# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-43-generic-pae linux-headers-3.2.0-38-generic-pae linux-headers-3.2.0-41-generic-pae linux-headers-3.2.0-36-generic-pae
linux-headers-3.2.0-63-generic-pae linux-headers-3.2.0-58-generic-pae linux-headers-3.2.0-60-generic-pae linux-headers-3.2.0-55-generic-pae linux-headers-3.2.0-40
linux-headers-3.2.0-41 linux-headers-3.2.0-36 linux-headers-3.2.0-37 linux-headers-3.2.0-43 linux-headers-3.2.0-38 linux-headers-3.2.0-44 linux-headers-3.2.0-39
linux-headers-3.2.0-45 linux-headers-3.2.0-51 linux-headers-3.2.0-52 linux-headers-3.2.0-53 linux-headers-3.2.0-48 linux-headers-3.2.0-54 linux-headers-3.2.0-60
linux-headers-3.2.0-55 linux-headers-3.2.0-61 linux-headers-3.2.0-56 linux-headers-3.2.0-57 linux-headers-3.2.0-63 linux-headers-3.2.0-58 linux-headers-3.2.0-59
linux-headers-3.2.0-52-generic-pae linux-headers-3.2.0-44-generic-pae linux-headers-3.2.0-39-generic-pae linux-headers-3.2.0-37-generic-pae
linux-headers-3.2.0-59-generic-pae linux-headers-3.2.0-61-generic-pae linux-headers-3.2.0-56-generic-pae linux-headers-3.2.0-53-generic-pae
linux-headers-3.2.0-48-generic-pae linux-headers-3.2.0-45-generic-pae linux-headers-3.2.0-40-generic-pae linux-headers-3.2.0-57-generic-pae
linux-headers-3.2.0-54-generic-pae linux-headers-3.2.0-51-generic-pae
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libssl-dev linux-generic-pae
The following packages will be upgraded:
libssl-dev linux-generic-pae
2 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
Need to get 0 B/1,427 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of libssl-dev:
libssl-dev depends on libssl1.0.0 (= 1.0.1-4ubuntu5.14); however:
Version of libssl1.0.0 on system is 1.0.1-4ubuntu5.17.
dpkg: error processing libssl-dev (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
dpkg: dependency problems prevent configuration of linux-generic-pae:
linux-generic-pae depends on linux-image-generic-pae (= 3.2.0.64.76); however:
Version of linux-image-generic-pae on system is 3.2.0.67.79.
linux-generic-pae depends on linux-headers-generic-pae (= 3.2.0.64.76); however:
Version of linux-headers-generic-pae on system is 3.2.0.67.79.
dpkg: error processing linux-generic-pae (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Errors were encountered while processing:
libssl-dev
linux-generic-pae
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
apt-get autoremove
apt-get -f install
從你的文字中挑選出來的似乎很合適......
你嘗試過嗎?
如果一切順利:
3. apt-get update && apt-get upgrade
...可能就位。
編輯您的帖子並添加<小時>標記到它的末尾,然後添加更多文字來回答這個問題/告訴發生了什麼問題。
答案2
由於您說過您已經手動安裝了一些軟體包,因此錯誤訊息中包含以下幾行:
dpkg: dependency problems prevent configuration of libssl-dev:
libssl-dev depends on libssl1.0.0 (= 1.0.1-4ubuntu5.14); however:
Version of libssl1.0.0 on system is 1.0.1-4ubuntu5.17.
dpkg: dependency problems prevent configuration of linux-generic-pae:
linux-generic-pae depends on linux-image-generic-pae (= 3.2.0.64.76); however:
Version of linux-image-generic-pae on system is 3.2.0.67.79.
linux-generic-pae depends on linux-headers-generic-pae (= 3.2.0.64.76); however:
Version of linux-headers-generic-pae on system is 3.2.0.67.79.
暗示安裝的某些軟體包是較新版本的。安裝此軟體包的舊版本和相關軟體包應該會apt
繼續。