当运行apt-get我得到以下输出:
apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0B of additional disk space will be used. Do you want to continue [Y/n]? Setting up linux-image-2.6.32-31-server (2.6.32-31.61) ... Running depmod. update-initramfs: Generating /boot/initrd.img-2.6.32-31-server gzip: stdout: No space left on device update-initramfs: failed for /boot/initrd.img-2.6.32-31-server Failed to create initrd image. dpkg: error processing linux-image-2.6.32-31-server (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-server: linux-image-server depends on linux-image-2.6.32-31-server; however: Package linux-image-2.6.32-31-server is not configured yet. dpkg: error processing linux-image-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-image-2.6.32-31-server linux-image-server E: Sub-process /usr/bin/dpkg returned an error code (1)
我看到它说“gzip:stdout:设备上没有剩余空间” – “df”显示/ dev / sda1已满。
我能做些什么呢?
从apt-get clean开始,确保你没有一堆旧的.deb文件。 如果没有足够的空间,请将文件移动到另一个分区或设备以释放空间。 如果您没有其他分区,请将其移至闪存驱动器或某处的networking共享位置。 我会从/ var / log中的旧日志文件开始。
如果这没有清理足够的空间,那么开始卸载你不使用的软件包。 或者为/ dev / sda1文件系统上的大型目录引入更多磁盘空间,这些目录可以移动到另一个分区(/ home,/ tmp等)
对于/ boot,这主要是linux-image-versionnumber软件包的内容。 你可以删除那些你不打算再次使用的旧内核。 也许这是每一个核心,但你现在的,但这是你的电话,而不是我的。
要获取系统的正在运行的内核版本:
root @ host:/ boot#uname -r 2.6.32-27generics
看看你有什么linux-image-versionnumber软件包:
root @ host:/ boot#dpkg -l | grep linux-image ii linux-image-2.6.20-15-generic 2.6.20-15.27 x86 / x86_64版本2.6.20的Linux内核映像 ii linux-image-2.6.20-16-generic 2.6.20-16.35 x86 / x86_64版本2.6.20的Linux内核映像 ii linux-image-2.6.20-17-generic 2.6.20-17.39 x86 / x86_64版本2.6.20的Linux内核映像 ii linux-image-2.6.22-14-386 2.6.22-14.52 i386上版本2.6.22的Linux内核映像 ii linux-image-2.6.22-16-generic 2.6.22-16.61 x86 / x86_64上版本2.6.22的Linux内核映像 ii linux-image-2.6.24-23-generic 2.6.24-23.48 x86 / x86_64上的版本2.6.24的Linux内核映像 ii linux-image-2.6.24-24-generic 2.6.24-24.53 x86 / x86_64版本2.6.24的Linux内核映像 ii linux-image-2.6.24-25-generic 2.6.24-25.63 x86 / x86_64上的版本2.6.24的Linux内核映像 ii linux-image-2.6.24-26-generic 2.6.24-26.64 x86 / x86_64上的版本2.6.24的Linux内核映像 ii linux-image-2.6.24-27-generic 2.6.24-27.65 x86 / x86_64版本2.6.24的Linux内核映像 ii linux-image-2.6.32-27-generic 2.6.32-27.49 x86 / x86_64版本2.6.32的Linux内核映像 ii linux-image-generic 2.6.32.27.29通用Linux内核映像
在这里,我有11个内核包,其中有10个我再也不会用了。 删除旧的:
apt-get remove linux-image-2.6.20-15-generic
不要触摸linux-image-generic ,只是linux-image-versionnumber软件包。