2

I've seen a few issues on the same problem but I can't seem to find a fix for my particular case. So here I go.

I have an issue with my apt and dpkg installations. While trying to download a package (here python3-pydrive), I get this error:

$ sudo apt install python3-pydrive
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  hwinfo libhd21 libx86emu3
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-cachetools python3-google-auth python3-google-auth-httplib2
  python3-googleapi python3-greenlet python3-oauth2client python3-openssl
  python3-pyasn1 python3-pyasn1-modules python3-rsa python3-sqlalchemy
  python3-sqlalchemy-ext python3-uritemplate
Suggested packages:
  python-greenlet-dev python-greenlet-doc python-openssl-doc
  python3-openssl-dbg python-sqlalchemy-doc python3-fdb python3-pymssql
  python3-mysqldb python3-psycopg2 python3-asyncpg python3-aiosqlite
The following packages will be REMOVED:
  linux-image-5.13.0-39-generic
The following NEW packages will be installed:
  python3-cachetools python3-google-auth python3-google-auth-httplib2
  python3-googleapi python3-greenlet python3-oauth2client python3-openssl
  python3-pyasn1 python3-pyasn1-modules python3-pydrive python3-rsa
  python3-sqlalchemy python3-sqlalchemy-ext python3-uritemplate
0 upgraded, 14 newly installed, 1 to remove and 186 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1’417 kB of archives.
After this operation, 1’337 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 202163 files and directories currently installed.)
Removing linux-image-5.13.0-39-generic (5.13.0-39.44) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-39-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/kawaiki/theme.txt
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1:
 cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-39-generic (--remove):
 installed linux-image-5.13.0-39-generic package post-removal script subprocess return
ed error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.13.0-39-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

I narrowed it down to a cause: grub-customizer. I went through a few issues with my distro, and reset the install once already. While I set up my grub a while ago to make it look better, using grub-customizer, through the reset I didn't keep the original grub-customizer installation, and so don't have the app anymore.

This is what I tried

I read through these issues

https://ubuntuforums.org/showthread.php?t=2474284
https://serverfault.com/questions/818445/error-while-loading-shared-libraries-libcrypto-so-1-1
Cannot remove old linux-image after 22.04 upgrade
How to fix kernel issue after upgrading from 18.10 to 19.04?
How to properly reset all grub/boot settings?
Upgrading to Ubuntu 22.04 causes libcrypto errors, apt/dpkg broken
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1969353

I downloaded and installed the missing libssl1 library manually through https://packages.ubuntu.com/impish/libssl1.1 and sudo dpkg --install libssl1.1*.deb which worked fine, but didn't fix the problem. I tried resetting my grub, but I'm not really sure how and update-grub it didn't work. I can't exactly recall everything I did, but I did almost everything I could in the thread above.

Any ideas I could try?

Edit: Answer to the first 4 comments in order:

apt autoremove failed with the same error

I'm using Ubuntu 22.04 LTS

mkdir $HOME/backup and sudo mv /etc/grub.d/bin/ $HOME/backup/ and sudo apt -f install failed on the last step with the same error

Yes, and by installing the libssl1 library, it should have fixed it. Yet the error is still there. I checked, and the file installed by the library /usr/lib/i386-linux-gnu/libcrypto.so.1.1 exists.

IT WORKED!!!

Thank you nobody for the solution! I ran this to fix it. It essentially moves a lot of grub files to a backup folder.

mkdir $HOME/backup
sudo mv /etc/grub.d/bin/ $HOME/backup/
ls /etc/grub.d/ | grep proxy | xargs -I '{}' mv {} $HOME/backup/
FatBaz
  • 31

1 Answers1

0

To add this as an answer, these are the 2 things that helped:

reinstalling the libssl1 library:
https://packages.ubuntu.com/impish/libssl1.1 and sudo dpkg --install libssl1.1*.deb

and removing old grub files:

mkdir $HOME/backup
sudo mv /etc/grub.d/bin/ $HOME/backup/
ls /etc/grub.d/ | grep proxy | xargs -I '{}' mv {} $HOME/backup/
FatBaz
  • 31