linux-headers 和 apt-get -f install 的问题

linux-headers 和 apt-get -f install 的问题

我已经很久没有寻求帮助了,但现在我急需帮助。

前段时间,我为一位朋友的电脑安装了 10.04。他仍在使用这个系统,但不知何故,他的 nvidia 驱动程序和整个系统开始出现问题。我一直试图远程帮助他从头开始,安装全新的 12.10。问题是他的 CD-rom 坏了,BIOS 不允许他从外部媒体(即 USB CD/DVD ROM 和/或 USB 闪存驱动器)启动。他的系统分区上的空间非常小,但已删除了足够多的空间,刚好能给他超过 1GB。我认为最好的解决方案是通过 grub2 从本地 iso 文件启动。但是,他的系统尚未更新/升级到 grub2,他仍在使用旧版本。我们似乎无法升级他的系统,因为,嗯,我想你可能会说 apt-get 坏了?并且 apt-get -f install 无法修复它。在解决这个问题之前,我们无法删除或添加软件包。我列出了我们尝试过的命令及其输出。

我将非常感激任何可以帮助我们将计算机更新到 grub2 和/或全新安装 Ubuntu 的帮助。

sudo apt-get -f 安装

dpkg: error processing /var/cache/apt/archives/linux-headers-2.6.32-45_2.6.32-45.104_all.deb (--unpack):
unable to create `/usr/src/linux-headers-2.6.32-45/drivers/cpufreq/Kconfig.dpkg-new' (while processing `./usr/src/linux-headers-2.6.32-45/drivers/cpufreq/Kconfig'): No space left on device
No apport report written because the error message indicates a disk full error
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-2.6.32-45_2.6.32-45.104_all.deb

sudo dpkg--configure-a

dpkg: dependency problems prevent configuration of linux-headers-2.6.32-45-generic:
linux-headers-2.6.32-45-generic depends on linux-headers-2.6.32-45; however:
Package linux-headers-2.6.32-45 is not installed.
dpkg: error processing linux-headers-2.6.32-45-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-2.6.32-45-generic; however:
Package linux-headers-2.6.32-45-generic is not configured yet.
dpkg: error processing linux-headers-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-2.6.32-45-generic
linux-headers-generic

sudo dpkg -i --force-overwrite /var/cache/apt/archives/linux-headers-2.6.32-45_2.6.32-45.104_all.deb

dpkg: error processing /var/cache/apt/archives/linux-headers-2.6.32-45_2.6.32-45.104_all.deb (--install):
unable to create `/usr/src/linux-headers-2.6.32-45/drivers/cpufreq/Kconfig.dpkg-new' (while processing `./usr/src/linux-headers-2.6.32-45/drivers/cpufreq/Kconfig'): No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-2.6.32-45_2.6.32-45.104_all.deb

sudo apt-get 自动删除

You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-headers-2.6.32-45-generic: Depends: linux-headers-2.6.32-45 but it is not installed
E: Unmet dependencies. Try using -f.

答案1

您是否尝试过删除旧的未使用的内核版本?首先使用 列出当前活动内核uname -r,然后使用 列出所有已安装的内核dpkg --list 'linux-image*',最后使用 删除除当前内核之外的所有内核apt-get remove linux-image-x.x.x-xx-generic。对我来说,这种方法非常有效。

相关内容