0

Getting this error 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.

Logs:

["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", {}]
Artur Meinild
  • 31,035
Adarsh S
  • 11
  • 2

1 Answers1

1

As the result of sudo dpkg -l | grep '^.[^i]' results the following as you posted in your comment:

rc linux-modules-extra-5.3.0-45-generic 5.3.0-45.37~18.04.1 amd64

Here, the first character of status code is r, which is for Remove (marked for removal); the second character is c, which indicates Cfg-files – Configuration files are present.

(There is a description at: How to interpret the status of dpkg (–list))

I suppose the following should fix your problem:

sudo dpkg --remove --force-all linux-modules-extra-5.3.0-45-generic

You need to run sudo dpkg --remove --force-all package_name01 package_name02 ... for all the packages that have the status code other than ii e.g. rc and the rest. (It is a bit exercise, but you can't do much with a system that has held broken packages, either these fix have to work or you'll end up taking a backup of your data and reinstall the system. In case you decide to reinstall or managed to fix this problem, I suggest you always keep synaptic package manager installed in your system with sudo apt-get install synaptic.)

Then finally the remaining commands:

sudo apt-get clean
sudo apt-get update
sudo apt-get --fix-broken install
sudo apt-get autoremove
rusty
  • 16,917