我想在运行 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)
答案1
apt-get -f install
是维修操作。所以有些事情现在您的系统存在错误,此错误旨在修复。
我的猜测是,如果你现在还没有安装内核,那么你真的需要这样做,因为您的系统现在可能无法启动!
答案2
这只是一个可用的内核升级。您可以毫无问题地进行更新。一旦重新启动,它将加载新内核。如果确实发生问题,您可以在引导加载程序中选择旧内核并卸载最新内核。