ubuntu apt-get error

前端之家收集整理的这篇文章主要介绍了ubuntu apt-get error前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ubuntu

参考:
https://forum.mxlinux.org/viewtopic.php?t=39921
http://www.jb51.cc/article/p-xvcqsqfg-bhq.html

最近在装新软件,然后

apt-get之后满屏幕都是

Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-133-generic /boot/vmlinuz-3.13.0-133-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-133-generic /boot/vmlinuz-3.13.0-133-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-133-generic /boot/vmlinuz-3.13.0-133-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-133-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-133-generic /boot/vmlinuz-3.13.0-133-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-133-generic /boot/vmlinuz-3.13.0-133-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-133-generic /boot/vmlinuz-3.13.0-133-generic
/usr/sbin/grub-mkconfig: 36: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-133-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-133-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.13.0-134-generic (3.13.0-134.183) ...

最后报错:

E: Sub-process /usr/bin/dpkg returned an error code (1)

找到方法:把包信息备份,重新apt-get update

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak
sudo mkdir /var/lib/dpkg/info
sudo apt-get update

但是执行 sudo apt-get update 的时候,报警告:

W: GPG error: http://download.virtualBox.org xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF

是这样修正的:

sudo -i
wget -q -O- http://download.virtualBox.org/virtualBox/debian/oracle_vBox_2016.asc | apt-key add -

猜你在找的Ubuntu相关文章