I somehow wound up in some kind of weird state while attempting to install some packages in Ubuntu 20.04LTS. It said that the package was already installed and then attempts to install or update GRUB. At first it popped up a purple screen with a warning that /dev/sda1 was not an EFI partition (correct) and that continuing would likely cause a failure to boot. I said no and it went into a loop asking over and over again until I killed the terminal (ctrl+C did not work). I had to kill a few apt related processes to be able to use apt again and then it insisted I fix the dpkg state:
sudo dpkg --configure -a
Setting up grub-efi-amd64-signed (1.173.2~20.04.1+2.04-1ubuntu47.4) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Setting up freerdp2-x11 (2.2.0+dfsg1-0ubuntu0.20.04.3) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
grub-efi-amd64-signed
The first time I ran that command it went into the infinite loop again. I restarted and it gave the above error. Now I get this condition whenever I try to install something:
sudo apt-get install freerdp2-x11
Reading package lists... Done
Building dependency tree
Reading state information... Done
freerdp2-x11 is already the newest version (2.2.0+dfsg1-0ubuntu0.20.04.3).
The following packages were automatically installed and are no longer required:
blender-data chromium-codecs-ffmpeg-extra fonts-dejavu gdal-data gstreamer1.0-vaapi libaec0 libarmadillo9 libarpack2 libavdevice58 libblosc1 libcfitsio8 libcharls2 libdap25 libdapclient6v5 libdcmtk14 libepsilon1 libfreexl1 libfwupdplugin1 libfyba0 libgdal26
libgdcm3.0 libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgstreamer-plugins-bad1.0-0 libhdf4-0-alt libhdf5-103 libjemalloc2 libkmlbase1 libkmldom1 libkmlengine1 libnetcdf15 libodbc1 libogdi4.1 libopenal-data libopenal1 libopencolorio1v5 libopencv-core4.2
libopencv-imgcodecs4.2 libopencv-imgproc4.2 libopencv-videoio4.2 libopenimageio2.1 libopenvdb6.2 libosdcpu3.4.0 libosdgpu3.4.0 libpq5 libproj15 libqhull7 libsocket++1 libspatialite7 libspnav0 libsquish0 libsuperlu5 libsz2 libtbb2 libtinyxml2.6.2v5 liburiparser1
libxerces-c3.2 libxmlb1 libyaml-cpp0.6 odbcinst odbcinst1debian2 proj-bin proj-data shim
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up grub-efi-amd64-signed (1.173.2~20.04.1+2.04-1ubuntu47.4) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
grub-efi-amd64-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)