[Seek Help] 执行sudo apt upgrade总是报错
Tofloor
poster avatar
Deepin Fans
deepin
2023-09-04 22:38
Author

如题。错误信息如下:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树   
正在读取状态信息... 完成   
正在计算更新... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
正在设置 initramfs-tools (0.137.36-deepin1) ...
update-initramfs: deferring update (trigger activated)
正在处理用于 initramfs-tools (0.137.36-deepin1) 的触发器 ...
update-initramfs: Generating /boot/initrd.img-5.18.4-amd64-desktop-hwe
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries 
    nor crypto modules. If that's on purpose, you may want to uninstall the 
    'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs 
    integration and avoid this warning.
I: The initramfs will attempt to resume from /dev/nvme0n1p4
I: (UUID=1540f185-d5bd-4b39-9b51-71f9f8536883)
I: Set the RESUME variable to override this.
live-boot: core filesystems devices utils udev blockdev dnsE: /usr/share/initramfs-tools/hooks/live failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.18.4-amd64-desktop-hwe with 1.
dpkg: 处理软件包 initramfs-tools (--configure)时出错:
 已安装 initramfs-tools 软件包 post-installation 脚本 子进程返回错误状态 1
在处理时有错误发生:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Reply Favorite View the author
All Replies
kingskill
deepin
2023-09-04 22:51
#1

If that's on purpose, you may want to uninstall the 'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs integration and avoid this warning.

Reply View the author
qq4945286
deepin
2023-09-05 05:28
#2

cd /var/lib/dpkg/
sudo mv info/ info_bak # 现将info文件夹更名
sudo mkdir info # 再新建一个新的info文件夹
sudo apt-get update # 更新
sudo apt-get -f install # 修复
sudo mv info/* info_bak/ # 执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_bak文件夹下
sudo rm -rf info # 把自己新建的info文件夹删掉
sudo mv info_bak info # 把以前的info文件夹重新改回名

Reply View the author