dpkg:依赖性问题阻碍了 linux-headers-generic 的配置

dpkg:依赖性问题阻碍了 linux-headers-generic 的配置

我在更新过程中用完了 inode,我认为这导致了未满足的依赖关系。系统建议我发出“apt-get -f install”来修复。但是由于缺少 inode,我无法发出该命令。

原来 linux-headers 和 linux-image 有很多老版本,我手动删除了:

$ sudo rm -rf /usr/src/linux-headers-3.2.0-65*

并且能够发出“apt-get -f install”,但现在我收到以下错误:

$ sudo 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-118-generic linux-headers-3.2.0-83-generic linux-image-3.2.0-94-generic linux-image-3.2.0-89-generic
linux-headers-3.2.0-99-generic linux-image-3.2.0-121-generic linux-image-3.2.0-116-generic unattended-upgrades
linux-headers-3.2.0-110-generic linux-headers-3.2.0-70-generic linux-headers-3.2.0-65-generic linux-headers-3.2.0-91-generic
linux-headers-3.2.0-86-generic linux-image-3.2.0-97-generic python-pycurl     linux-image-3.2.0-119-generic
linux-headers-3.2.0-113-generic linux-headers-3.2.0-70 linux-headers-3.2.0-65 linux-headers-3.2.0-72 linux-headers-3.2.0-68
linux-headers-3.2.0-74 linux-headers-3.2.0-69 linux-headers-3.2.0-80 linux-headers-3.2.0-75 linux-headers-3.2.0-76
linux-headers-3.2.0-82 linux-headers-3.2.0-77 linux-headers-3.2.0-83 linux-headers-3.2.0-84 linux-headers-3.2.0-79
linux-headers-3.2.0-90 linux-headers-3.2.0-85 linux-headers-3.2.0-91 linux-headers-3.2.0-86 linux-headers-3.2.0-92
linux-headers-3.2.0-87 linux-headers-3.2.0-93 linux-headers-3.2.0-88 linux-headers-3.2.0-94 linux-headers-3.2.0-89
linux-headers-3.2.0-95 linux-headers-3.2.0-96 linux-headers-3.2.0-97 linux-headers-3.2.0-98 linux-headers-3.2.0-99
linux-headers-3.2.0-68-generic linux-image-3.2.0-84-generic python-cheetah linux-headers-3.2.0-94-generic
linux-headers-3.2.0-89-generic linux-image-3.2.0-111-generic linux-image-3.2.0-106-generic python-software-properties
linux-headers-3.2.0-121-generic linux-headers-3.2.0-116-generic python-oauth linux-headers-3.2.0-76-generic
linux-image-3.2.0-92-generic linux-image-3.2.0-87-generic linux-headers-3.2.0-97-generic linux-image-3.2.0-109-generic
linux-headers-3.2.0-119-generic linux-headers-3.2.0-84-generic linux-headers-3.2.0-79-generic linux-image-3.2.0-101-generic
linux-image-3.2.0-95-generic python-paramiko linux-headers-3.2.0-111-generic linux-headers-3.2.0-106-generic
linux-headers-3.2.0-92-generic linux-headers-3.2.0-87-generic linux-image-3.2.0-104-generic linux-image-3.2.0-98-generic
linux-headers-3.2.0-109-generic linux-headers-3.2.0-74-generic linux-headers-3.2.0-69-generic linux-image-3.2.0-90-generic
linux-image-3.2.0-85-generic linux-headers-3.2.0-95-generic linux-image-3.2.0-107-generic linux-headers-3.2.0-101-generic
python-boto linux-headers-3.2.0-82-generic linux-headers-3.2.0-77-generic   python-configobj linux-image-3.2.0-93-generic
linux-image-3.2.0-88-generic linux-headers-3.2.0-98-generic linux-image-3.2.0-120-generic linux-image-3.2.0-115-generic
linux-headers-3.2.0-104-generic linux-headers-3.2.0-90-generic linux-headers-3.2.0-85-generic linux-image-3.2.0-102-generic
python-m2crypto linux-image-3.2.0-96-generic linux-image-3.2.0-118-generic linux-headers-3.2.0-107-generic
linux-headers-3.2.0-72-generic euca2ools linux-image-3.2.0-83-generic linux-headers-3.2.0-93-generic
linux-headers-3.2.0-88-generic linux-image-3.2.0-110-generic linux-image-3.2.0-99-generic linux-headers-3.2.0-101
linux-headers-3.2.0-102 linux-headers-3.2.0-104 linux-headers-3.2.0-110 linux-headers-3.2.0-111 linux-headers-3.2.0-106
linux-headers-3.2.0-107 linux-headers-3.2.0-113 linux-headers-3.2.0-109 linux-headers-3.2.0-120 linux-headers-3.2.0-115
linux-headers-3.2.0-121 linux-headers-3.2.0-116 linux-headers-3.2.0-118 linux-headers-3.2.0-119
linux-headers-3.2.0-120-generic linux-headers-3.2.0-115-generic linux-headers-3.2.0-80-generic linux-headers-3.2.0-75-generic
python-crypto linux-image-3.2.0-91-generic linux-image-3.2.0-86-generic linux-headers-3.2.0-96-generic
linux-image-3.2.0-113-generic linux-headers-3.2.0-102-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-generic linux-headers-generic
The following packages will be upgraded:
linux-generic linux-headers-generic
2 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
2 not fully installed or removed.
Need to get 4,282 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirror.rackspace.com/ubuntu/ precise-updates/main linux-generic amd64 3.2.0.124.139 [1,718 B]
Get:2 http://mirror.rackspace.com/ubuntu/ precise-updates/main linux-headers-generic amd64 3.2.0.124.139 [2,564 B]
Fetched 4,282 B in 0s (180 kB/s)            
dpkg: dependency problems prevent configuration of linux-headers-generic:
  linux-headers-generic depends on linux-headers-3.2.0-123-generic; however:
Package linux-headers-3.2.0-123-generic is not installed.
dpkg: error processing linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.2.0.123.138); however:
Version of linux-image-generic on system is 3.2.0.124.139.
 linux-generic depends on linux-headers-generic (= 3.2.0.123.138); however:
  Package linux-headers-generic is not configured yet.
dpkg: error processing linux-generic (--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-headers-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

我猜想 3.2.0.123 在磁盘腾出空间时不知何故被损坏了,需要重新安装。但我不是专家,也不想让问题变得更糟。

有人能帮我解决这个问题吗?提前谢谢,Jose Ambros-Ingerson

答案1

我可以通过删除并重新安装 Linux 标头和图像来解决上述问题。具体来说:

$ sudo dpkg --remove --force-remove-reinstreq linux-headers-generic
$ sudo dpkg --remove --force-remove-reinstreq linux-generic
$ sudo apt-get -f install
$ sudo apt-get install linux-image-generic

最后也安装了标题。

我不确定这是否是解决我的问题的最佳方法。但确实如此。感谢所有阅读我帖子的人。

相关内容