Ubuntu

Ubuntu中的這種依賴升級安全嗎?

  • February 21, 2014

我想在執行 Ubuntu 12.04 LTS 的內部生產伺服器上安裝 PHP5。當我嘗試使用apt-get它來安裝它時,它會列出大量依賴項並建議執行apt-get -f install. 當我執行它時,我得到了這個返回:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
 linux-headers-3.2.0-59 linux-headers-3.2.0-59-generic linux-headers-server linux-image-3.2.0-59-generic linux-image-server linux-server
Suggested packages:
 fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
 linux-headers-3.2.0-59 linux-headers-3.2.0-59-generic linux-image-3.2.0-59-generic
The following packages will be upgraded:
 linux-headers-server linux-image-server linux-server
3 upgraded, 3 newly installed, 0 to remove and 379 not upgraded.
3 not fully installed or removed.
Need to get 51.4 MB of archives.
After this operation, 218 MB of additional disk space will be used.
Do you want to continue [Y/n]? n

這是在生產機器上進行的安全升級嗎?我知道apt-get dist-upgrade可能非常重要並且會破壞事情。這是小升級還是大升級?

謝謝

—更新1—

分區已滿,/boot不允許我執行apt-get -f install。嘗試從 ubuntugenius 執行此腳本時,dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge我得到以下資訊:

rgs sudo apt-get -y purge 
[sudo] password for tech: 
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:
linux-headers-server : Depends: linux-headers-3.2.0-59-generic but it is not going to be installed
linux-server : Depends: linux-headers-server (= 3.2.0.37.44) but 3.2.0.59.70 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我覺得我現在陷入了一個循環,充滿/boot了不會讓我執行修復,但我無法/boot在不執行修復的情況下清除。

— 更新 2 —-

我已經成功清除了一些空間,/boot直到現在才得到以下錯誤:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
 linux-server
The following packages will be upgraded:
 linux-server
1 upgraded, 0 newly installed, 0 to remove and 379 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,732 B 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 linux-server:
linux-server depends on linux-image-server (= 3.2.0.37.44); however:
 Version of linux-image-server on system is 3.2.0.59.70.
linux-server depends on linux-headers-server (= 3.2.0.37.44); however:
 Version of linux-headers-server on system is 3.2.0.59.70.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                         Errors were encountered while processing:
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt-get -f install修復操作。因此,您的系統目前存在一些問題,這是要修復的。

我的猜測是,如果您現在還沒有安裝核心,那麼您真的需要這樣做,因為您現在的系統甚至可能無法啟動!

這只是一個可用的核心升級。您可以毫無問題地更新。重新啟動後,它將載入新核心。如果確實發生了某些事情,您可以在引導載入程序中選擇較舊的核心並解除安裝最新的核心。

引用自:https://serverfault.com/questions/577387