收到此错误sudo pro enable fips-updates
:
Failed running command 'apt-get install --assume-yes --allow-downgrades -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" ubuntu-fips' [exit(100)].
Message: E: Unable to correct problems, you have held broken packages.
日志:
["2024-01-18T02:36:14.000", "WARNING", "ubuntupro.system", "subp", 715,
"Stderr: E: Unable to correct problems, you have held broken packages.\n\n
Stdout: Reading package lists...\n
Building dependency tree...\n
Reading state information...\n
Some packages could not be installed. This may mean that you have\n
requested an impossible situation or if you are using the unstable\n
distribution that some required packages have not yet been created\n
or been moved out of Incoming.\n
The following information may help to resolve the situation:\n\n
The following packages have unmet dependencies:\n
libgcrypt20-hmac : Depends: libgcrypt20 (= 1.9.4-3ubuntu3+Fips1.2) but 1.9.4-3ubuntu3 is to be installed\n
ubuntu-fips : Depends: libssl3 (= 3.0.2-0ubuntu1.12+Fips1) but 3.0.2-0ubuntu1.12 is to be installed\n
Depends: libgcrypt20 (= 1.9.4-3ubuntu3+Fips1.2) but 1.9.4-3ubuntu3 is to be installed\n", {}]
答案1
sudo dpkg -l | grep '^.[^i]'
正如您在评论中发布的结果所示,结果如下:
rc linux-modules-extra-5.3.0-45-generic 5.3.0-45.37~18.04.1 amd64
这里状态码第一个字符是r
,代表 Remove(标记为删除);第二个字符是c
,代表 Cfg-files – 配置文件存在。
(有一段描述:如何解释 dpkg 的状态(--list))
我认为以下方法可以解决您的问题:
sudo dpkg --remove --force-all linux-modules-extra-5.3.0-45-generic
您需要对除eg和其余sudo dpkg --remove --force-all package_name01 package_name02 ...
之外的所有具有状态代码的软件包运行。(这有点练习,但对于包含损坏软件包的系统,您无能为力,要么这些修复必须起作用,要么您最终将备份数据并重新安装系统。如果您决定重新安装或设法修复此问题,我建议您始终在系统中安装软件包管理器。)ii
rc
synaptic
sudo apt-get install synaptic
最后剩下的命令是:
sudo apt-get clean
sudo apt-get update
sudo apt-get --fix-broken install
sudo apt-get autoremove