我在Xen下运行Ubuntu 10.4虚拟化, grub-pc软件包坏了, apt-get每次运行apt-get通知我。
我只想configurationapt-get / aptitude来永久忽略这个包。
我该怎么做呢?
处理过程中遇到错误: 蛴螬PC E:subprocess/ usr / bin / dpkg返回错误码(1) 一个包没有安装。 试图恢复: 设置grub-pc(1.98-1ubuntu7)... dpkg:处理grub-pc错误(--configure): 安装后的subprocess脚本返回错误退出状态1 处理过程中遇到错误: 蛴螬PC
echo 'grub-pc hold' | dpkg --set-selections
或者通过资质,你可以把这个包标记为“等待”
但是,由于他们正在使用grub2,所以你可以看看.postinst文件,看看它为什么失败。
/var/lib/dpkg/info/grub-pc.postinst
把set -x放在代码的最初位之下,然后:
apt-get -f install
并发布报告的错误消息。
另外,从输出
dpkg -l | grep grub
编辑
grub-common.postinst和grub-pc.postinst
删除第三行下面的所有内容,使它们看起来像这样:
!#/bin/bash set -e