![apt-get 升级失败](https://linux22.com/image/987183/apt-get%20%E5%8D%87%E7%BA%A7%E5%A4%B1%E8%B4%A5.png)
我正在运行 Ubuntu 14.04,并尝试 apt-get 升级,但目前失败并出现以下错误。我有点不知所措。
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-30-generic
cp: cannot stat ‘/lib/libnss_nisplus-2.19.31a.so’: No such file or directory
cp: cannot stat ‘/lib/libnss_nisplus-2.19.31a.so’: No such file or directory
cp: cannot stat ‘/lib/libnss_nisplus-2.19.31a.so’: No such file or directory
cp: cannot stat ‘/lib/libnss_nisplus-2.19.31a.so’: No such file or directory
cp: cannot stat ‘/lib/libnss_nisplus-2.19.31a.so’: No such file or directory
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.13.0-30-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
我现在尝试使用 apt-get 运行的任何操作都会失败。
答案1
如果遇到此类问题,您应该做的第一件事是:打开终端并输入dpkg --audit
,然后根据dpkg
返回的结果继续执行以下步骤。
从命令行:
sudo apt --fix-missing install
sudo apt --fix-broken install
sudo apt autoremove
sudo apt autoclean
sudo apt clean
sudo apt update
sudo apt upgrade
确保检查apt
每一步之后提出的解决方案是什么。