首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我得到任何东西时,我得到这个错误“E:Sub /usr/bin/dpkg返回一个错误代码(1)”

当我得到任何东西时,我得到这个错误“E:Sub /usr/bin/dpkg返回一个错误代码(1)”
EN

Server Fault用户
提问于 2011-12-06 07:38:56
回答 1查看 353关注 0票数 -1

例如,当我"sudo apt install libmemcache0“时,我得到了:

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libmemcache0 is already the newest version.
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.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up linux-image-2.6.24-16-xen (2.6.24-16.30) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.24-16-xen
Could not find postinst hook script [update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
dpkg: error processing linux-image-2.6.24-16-xen (--configure):
 subprocess post-installation script returned error exit status 2
Setting up linux-image-2.6.24-24-386 (2.6.24-24.61) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "zh_CN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.24-24-386
Could not find postinst hook script [update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
dpkg: error processing linux-image-2.6.24-24-386 (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-2.6.24-16-xen
 linux-image-2.6.24-24-386
E: Sub-process /usr/bin/dpkg returned an error code (1)

我能做什么?

我用的是linode而不是grub。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2011-12-06 07:49:16

作为使apt高兴的临时修复,您可能可以调整您的kernel-img.conf文件,以便系统不尝试运行update-grub。这应该允许post安装脚本在没有错误的情况下完成。它显然不会更新引导加载程序,也不会将系统切换到使用更新的内核。由于您使用的是特定于xen的内核,所以您几乎肯定不希望切换到标准386内核。

代码语言:javascript
复制
#/etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
#postinst_hook = update-grub
#postrm_hook   = update-grub
票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/338040

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档