我在 Ubuntu 12.04.3 LTS 64 位服务器版本中努力寻找了几天的解决方案,请提供进一步的建议。
sudo apt-get update
=> 工作正常
sudo apt-get -f install
,,sudo apt-get autoremove
`sudo apt-get upgrade => 显示以下 Error_Message
错误信息
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-image-generic-lts-quantal : Depends: linux-image-3.5.0-41-generic but it is not installed
E: Unmet dependencies. Try using -f.
sudo apt-get clean | sudo apt-get autoclean
=> 不做任何事
请找到这些命令的输出,
sudo dpkg --configure -a
Setting up initramfs-tools (0.99ubuntu13.2) ...
update-initramfs: deferring update (trigger activated)
dpkg: dependency problems prevent configuration of linux-image-generic-lts-quantal:
linux-image-generic-lts-quantal depends on linux-image-3.5.0-41-generic; however:
Package linux-image-3.5.0-41-generic is not installed.
dpkg: error processing linux-image-generic-lts-quantal (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-quantal:
linux-generic-lts-quantal depends on linux-image-generic-lts-quantal; however:
Package linux-image-generic-lts-quantal is not configured yet.
dpkg: error processing linux-generic-lts-quantal (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-39-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.5.0-39-generic with 1.
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-generic-lts-quantal
linux-generic-lts-quantal
initramfs-tools
sudo apt-get remove --purge linux-image-generic-lts-quantal linux-generic-lts-quantal initramfs-tools
显示上述相同的错误消息。
sudo 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-image-3.5.0-42-generic linux-image-generic-lts-quantal
Suggested packages:
fdutils linux-lts-quantal-doc-3.5.0 linux-lts-quantal-source-3.5.0 linux-lts-quantal-tools linux-headers-3.5.0-42-generic
The following NEW packages will be installed:
linux-image-3.5.0-42-generic
The following packages will be upgraded:
linux-image-generic-lts-quantal
1 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
3 not fully installed or removed.
Need to get 40.7 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://in.archive.ubuntu.com/ubuntu/ precise-security/main linux-image-3.5.0-42-generic amd64 3.5.0-42.65~precise1 [40.7 MB]
Get:2 http://in.archive.ubuntu.com/ubuntu/ precise-security/main linux-image-generic-lts-quantal amd64 3.5.0.42.48 [2,406 B]
Fetched 40.7 MB in 2min 41s (252 kB/s)
(Reading database ... 191233 files and directories currently installed.)
Unpacking linux-image-3.5.0-42-generic (from .../linux-image-3.5.0-42-generic_3.5.0-42.65~precise1_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-42-generic_3.5.0-42.65~precise1_amd64.deb (--unpack):
failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.5.0-42-generic': No space left on device
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-42-generic /boot/vmlinuz-3.5.0-42-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-42-generic /boot/vmlinuz-3.5.0-42-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.5.0-42-generic_3.5.0-42.65~precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
cat /etc/apt/sources.list
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
###### Ubuntu Update Repos
deb http://in.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
请帮忙!!!!
答案1
您的 /boot 分区已满。您需要删除一些旧的 Linux 映像以腾出空间。您可以按照此链接中的建议进行操作:如何在 /boot 中释放更多空间?。完成此操作后,您可以重新运行您正在尝试的 apt-get 命令。