linux-image-server、linux-image 和 linux-headers 的依赖问题

linux-image-server、linux-image 和 linux-headers 的依赖问题

我遇到了 /boot 已满的问题,但现在 /boot 中有很多空间。但现在我无法做apt-get autoremove其他apt-get -f install任何事情。似乎标头不在 /boot 中,并且一直在升级,而 Linux 映像却没有。我下一步应该尝试什么?

我也尝试过apt-get dist-upgrade,但由于同样的依赖问题,也失败了。

输出ls /var/cache/apt/archives/var/cache/apt/archives/partial 这里

root@ethan:/boot# apt-get clean
root@ethan:/boot# apt-get autoclean
Reading package lists... Done
Building dependency tree       
Reading state information... Done
root@ethan:/boot# apt-get install linux-generic
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-generic : Depends: linux-image-generic (= 3.2.0.76.90) but it is not going to be installed
                 Depends: linux-headers-generic (= 3.2.0.76.90) but it is not going to be installed
 linux-server : Depends: linux-image-server (= 3.2.0.69.82) but 3.2.0.76.90 is to be installed
                Depends: linux-headers-server (= 3.2.0.69.82) but 3.2.0.76.90 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ethan:/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-61 linux-headers-3.2.0-64 linux-headers-3.2.0-67
  linux-headers-3.2.0-61-generic linux-headers-3.2.0-64-generic
  linux-headers-3.2.0-67-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 158 not upgraded.
1 not fully installed or removed.
Need to get 1,724 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://ai.archive.ubuntu.com/ubuntu/ precise-updates/main linux-server amd64 3.2.0.76.90 [1,724 B]
Fetched 1,724 B in 0s (2,544 B/s)       
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.69.82); however:
  Version of linux-image-server on system is 3.2.0.76.90.
 linux-server depends on linux-headers-server (= 3.2.0.69.82); however:
  Version of linux-headers-server on system is 3.2.0.76.90.
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

做一个:

sudo rm /var/cache/apt/archives/*
sudo rm /var/cache/apt/archives/partial/*

然后是:

cd /var/cache/apt/archives
sudo apt-get download linux-server linux-image-server linux-headers-server

linux-server由于(= 3.2.0.69.82) 和(= 3.2.0.76.90)版本之间似乎存在差异,linux-image-server请使用以下命令安装软件包:

sudo dpkg --install --force-all linux-server* linux-image-server* linux-headers-server*

由于这些.deb文件是使用下载的apt-get并且强制安装,因此dpkg它们不会破坏将来的自动更新……

相关内容