I am getting error while using sudo apt-get upgrade
stating:
dpkg: error processing libgfortran3:amd64 (--configure):
package libgfortran3:amd64 is not ready for configuration
cannot configure (current status `half-installed')
Errors were encountered while processing:
libgfortran3:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
It does not seem to block the installation/upgrade other applications. I believe this problem arose due to direct shutting down of my PC while the application was being upgraded.
How can I fix this?
dpkg -l | grep -e '^i[^i]'
. Each package appears on a line, and the first two characters of the line are the (1) desired state and (2) status. Desired ofi
means "Install", and status ofi
would mean "Installed". So the regex is "all lines that start withi
but don't havei
in the second position". So an unpacked but not configured package could beiU
, and a package that was configured but didn't complete could beiF
(halF configured). To get the full list of status:dpkg -l | head -n 2