Kesalahan: "Sub-proses / usr / bin / dpkg mengembalikan kode kesalahan (1)"


0

misalnya ketika saya "sudo apt-get install libmemcache0", saya mendapat:

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)

Apa yang dapat saya?


Apakah ini VM? Apakah Anda sudah menginstal grub?
— Paul

Masalah Anda tampaknya dengan GRUB. Pastikan bahwa GRUB diinstal dengan benar (instal ulang jika perlu) dan bahwa path di /etc/kernel-img.config benar Lihat juga: serverfault.com/questions/328773/…
— user55325

Linode vps, bagaimana saya tahu ada grub?
— Tinyfool

@ user55325 Tapi ketika saya menjalankan "yang pembaruan-grub" atau "yang grub", tidak ada.
— Tinyfool

@ Paul menggunakan vps linode, tidak ada grub.
— Tinyfool

Jawaban:


3

Ketika Anda menjalankan VM, Anda tidak ingin ubuntu mencoba menginstal ulang grub setelah mengubah hal-hal terkait kernel, karena Anda tidak memiliki boot loader sendiri.

Edit

/etc/kernel-img.conf

Dan berikan komentar:

postinst_hook = update-grub
postrm_hook   = update-grub

Anda mungkin membutuhkan

sudo apt-get -f install

setelah itu

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.