在執行apt-get和系統更新時都遇到了一個錯誤:
update-initramfs: Generating /boot/initrd.img-2.6.32-41-generic Not updating initrd symbolic links since we are being updated/reinstalled (2.6.32-41.88 was configured last, according to dpkg) Not updating image symbolic links since we are being updated/reinstalled (2.6.32-41.88 was configured last, according to dpkg) Could not find postinst hook script [update-grub]. Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin' dpkg:處理 linux-image-2.6.32-41-generic (--configure)時出錯: 子進程 已安裝的 post-installation 腳本 返回了錯誤號 2 在處理時有錯誤發生: linux-image-2.6.32-41-generic E: Sub-process /usr/bin/dpkg returned an error code (1) |
這個錯誤信息的源頭就是這段信息上面所顯示的一個錯誤:Could not find postinst hook script [update-grub]
原因是/etc/kernal-img.conf裏面的postinst_hook無法找到後面那個值所指向的目錄,比如在我的系統上面就是因爲我之前誤刪了grub,而後面配置了update-grub,因此出錯了。。
所以我就直接apt-get install grub解決了