首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法-获得安装或移除任何软件包。initramfs-工具失败

无法-获得安装或移除任何软件包。initramfs-工具失败
EN

Ask Ubuntu用户
提问于 2020-06-11 20:37:53
回答 2查看 2.1K关注 0票数 3

当我试着安装一些东西时,我的密码好像出了问题。

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package meofetch
t@pop-os:~$ sudo apt-get remove neofetch
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  neofetch
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 339 kB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.136ubuntu6) ...
update-initramfs: deferring update (trigger activated)
(Reading database ... 358177 files and directories currently installed.)
Removing neofetch (7.0.0-1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-7634-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.4.0-7634-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
EN

回答 2

Ask Ubuntu用户

发布于 2020-06-12 05:47:28

问题中报告的错误消息仅在20.04中发生。这是一个解决办法。

  1. 引导到恢复模式,直到加载密码交换文件超时。
  2. 转到根shell (恢复菜单底部的第二个条目),在/etc/fstab/etc/crypttab中注释以下行,在每一行前面加上一个#字符。/etc/fstab:/dev/mapper/cryptswap无交换缺省值0 0 /etc/crypttab:cryptswap /cryptswapfile /dev/urandom交换,密码=aes-xts-平原64,size=256
  3. 运行swapoff -a && update-initramfs -u
  4. 取消注释您注释掉的fstab和crypttab中的行,然后用sudo reboot重新启动。
票数 3
EN

Ask Ubuntu用户

发布于 2020-11-27 15:05:22

对于具有类似消息的人,同时也谈到可能设置为错误UUID的简历变量:

只需删除initramfs-tools (sudo rm /etc/initramfs-tools/conf.d/resume)的简历文件中的自动设置简历变量,或者将其更新到交换分区的正确UUID。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1249411

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档