E:subprocess/ usr / bin / dpkg返回错误码(1)

在尝试更新Debian 6,x64上的linux-image-2.6.32-5-amd64软件包时出现错误。

 Setting up linux-image-2.6.32-5-amd64 (2.6.32-41squeeze2) ... Running depmod. Running update-initramfs. update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64 Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64 run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64 Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... Generating /boot/grub/default file and setting the default boot entry to 0 entry not specified. run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-amd64.postinst line 799, <STDIN> line 2. dpkg: error processing linux-image-2.6.32-5-amd64 (--configure): subprocess installed post-installation script returned error exit status 128 configured to not write apport reports Errors were encountered while processing: linux-image-2.6.32-5-amd64 E: Sub-process /usr/bin/dpkg returned an error code (1) 

难道我做错了什么?

我今天遇到了同样的问题(zz-update-grub返回1),这个问题没有告诉你很多。 我分开grub-mkconfig(在每个地方添加echo语句),直到我发现它死在采购/ etc / default / grub,在那里我添加了一些交换检测逻辑到默认的linux cmdline。

当我的交换分区目前closures(我今天我的内存翻了三倍),它没有find一个交换分区,反拨的调用静默地导致脚本退出。 Swapon修复了一切,尽pipe我已经在/ etc / default / grub中添加了一个带有实际错误信息的testing。

我不知道这是否是你的实际问题,但它至less是一个开始寻找的地方(zz-update-grub主要运行update-grub,它运行带有一些参数的grub-mkconfig)。 如果有帮助,我可以发布我的代码。