我的 Ubuntu 服务器处于不一致状态。我已阅读了有关类似问题的帖子,但仍然不确定如何最好地处理。
以下是一些信息:
# dpkg --print-architecture
amd64
# uname -r
3.2.0-60-generic
背景是,我发现 /boot 分区已满,正在尝试清理时,我开始收到错误。最初内核级别是,3.2.0-44-generic
但我的升级尝试带来了较新的文件,不幸的是,在升级过程中 /boot 分区再次填满。
现在我得到以下信息:
#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-39-generic linux-headers-3.2.0-34 linux-headers-3.2.0-40 linux-headers-3.2.0-41 linux-headers-3.2.0-43
linux-headers-3.2.0-38 linux-headers-3.2.0-39 linux-headers-3.2.0-34-generic linux-image-3.2.0-40-generic linux-image-3.2.0-43-generic
linux-headers-3.2.0-40-generic linux-headers-3.2.0-43-generic linux-headers-3.2.0-38-generic linux-image-3.2.0-41-generic
linux-image-3.2.0-39-generic linux-headers-3.2.0-41-generic
Use 'apt-get autoremove' to remove them.
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 159 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,734 B of archives.
After this operation, 0 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.45.54); however:
Version of linux-image-server on system is 3.2.0.60.71.
linux-server depends on linux-headers-server (= 3.2.0.45.54); however:
Version of linux-headers-server on system is 3.2.0.60.71.
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
下载并安装了旧版本的 linux-image-server 和 linux-headers-server。然后能够重新安装 linux-server。之后 apt-get 就可以正常工作了。
$ wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-image-server_3.2.0.45.54_amd64.deb
$ sudo dpkg -i linux-image-server_3.2.0.45.54_*.deb
$ wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-headers-server_3.2.0.45.54_amd64.deb
$ sudo dpkg -i linux-headers-server_3.2.0.45.54_*.deb
$ sudo dpkg -i linux-server_3.2.0.45.54_*.deb
$ sudo apt-get -f install