19

I'm on Ubuntu 22.04 (Jammy Jellyfish), and I have upgraded from 21.10 today. My machine is an Asus Vivobook K3500PH, with an Intel i7 11th Gen processor, a Nvidia GTX 1650 Max-Q Graphics Card. My system originally has a Linux 5.15 kernel, which was recently upgraded from a 5.13 kernel.

EDIT: This thread is also applicable for those who did not install a new kernel but upgraded to Ubuntu 22.04.

Background Info

Due to issues with my Wi-Fi driver, I would like to upgrade to the latest Linux kernel, which is 5.17.4 at this time of writing.

I found a guide online, and installed the .deb files for the kernel from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17.4/amd64/. Afterward, I proceeded to run sudo dpkg -i *.deb, installing the .deb files downloaded.

Errors encountered

The install failed with

Reading database ... 224038 files and directories currently installed.)
Preparing to unpack linux-headers-5.17.4-051704_5.17.4-051704.202204200842_all.deb ...
Unpacking linux-headers-5.17.4-051704 (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
Preparing to unpack linux-headers-5.17.4-051704-generic_5.17.4-051704.202204200842_amd64.deb ...
Unpacking linux-headers-5.17.4-051704-generic (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
Preparing to unpack linux-image-unsigned-5.17.4-051704-generic_5.17.4-051704.202204200842_amd64.deb ...
Unpacking linux-image-unsigned-5.17.4-051704-generic (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
/var/lib/dpkg/info/linux-image-unsigned-5.17.4-051704-generic.postrm ... removing pending trigger
Preparing to unpack linux-modules-5.17.4-051704-generic_5.17.4-051704.202204200842_amd64.deb ...
Unpacking linux-modules-5.17.4-051704-generic (5.17.4-051704.202204200842) over (5.17.4-051704.202204200842) ...
Setting up linux-headers-5.17.4-051704 (5.17.4-051704.202204200842) ...
Setting up linux-headers-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.17.4-051704-generic
   ...done.
Setting up linux-image-unsigned-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
Setting up linux-modules-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
Processing triggers for linux-image-unsigned-5.17.4-051704-generic (5.17.4-051704.202204200842) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.17.4-051704-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.17.4-051704-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p5
I: (UUID=11ad606c-1f98-4dc1-b567-9b3fe528bd2e)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.17.4-051704-generic
Found initrd image: /boot/initrd.img-5.17.4-051704-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Found linux image: /boot/vmlinuz-5.13.0-40-generic
Found initrd image: /boot/initrd.img-5.13.0-40-generic
/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/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-unsigned-5.17.4-051704-generic (--install):
 installed linux-image-unsigned-5.17.4-051704-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-unsigned-5.17.4-051704-generic

From /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, I inferred that a library may be missing. As per this Stack Exchange post, I went to install the required libraries.

However, this error log is shown whenever I run apt, for any package I have tried:

The following packages will be REMOVED:
  linux-image-5.13.0-19-generic
........
Fetched 140 kB in 2s (80.2 kB/s) 
(Reading database ... 224038 files and directories currently installed.)
Removing linux-image-5.13.0-19-generic (5.13.0-19.19) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-19-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 linux image: /boot/vmlinuz-5.17.4-051704-generic
Found initrd image: /boot/initrd.img-5.17.4-051704-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Found linux image: /boot/vmlinuz-5.13.0-40-generic
Found initrd image: /boot/initrd.img-5.13.0-40-generic
/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-19-generic (--remove):
 installed linux-image-5.13.0-19-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.13.0-19-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems like apt is broken, so I cannot install any libraries or software.

Both errors point to the lack of libcrypto...., so that may be the error. How do I resolve the issue, and also install the newer Linux kernel version?

EDIT: View https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1969353 for more details.

BenMorel
  • 161
LCZ
  • 293
  • Looks like this may have been caused by Grub Customizer: https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg6019738.html – LCZ Apr 27 '22 at 13:10

7 Answers7

25

I had the same issue after upgrading from 20.04 to 22.04, without trying to install a new kernel.

The missing libcrypto.so.1.1 is part of libssl1.1, which needs to be installed in order to fix the issue. While apt is broken in this case, you can still manually download the correct .deb for your distro and then install it using dpkg. For example, I downloaded the amd64 version directly from packages.debian.org and then installed it using

sudo dpkg -i libssl1.1*.deb

after which I can use apt once again.

After doing this, I realized you can also search the Ubuntu packages repository. They apparently haven't provided an install candidate for libssl1.1 for Ubuntu 22.04, only one for libssl3. It is possible that this is the core of the issue. You should also be able to use the one from the version you upgraded from. However, the one from packages.debian.org worked fine for me.

  • Thanks, I'll give it a try. – LCZ Apr 23 '22 at 07:36
  • 2
    By the way, this problem seems to be caused by the package "grub customizer", which I have also installed on my machine before this happened. – LCZ Apr 27 '22 at 15:08
  • see forums.linuxmint.com/viewtopic.php?p=1391228sid=2d9c63ca0b81a91252526f85d6823498#p1391228 : GrubCustomizer creates a copy of the original files in a subfolder on this place. Copy those backups back to their original places (overwriting their older instances as set b GC). then purge and reinstall grub using : https://ubuntuforums.org/showthread.php?t=2198824 – pippo1980 Jul 15 '22 at 16:42
  • The origin is Grub Customizer, but this particular solution was spot on, download included and everything. – A. Perez Cera Aug 06 '22 at 16:34
10

manual install libssl1.1 also fixed my problem:

wget http://debian.mirror.ac.za/debian/pool/main/o/openssl/libssl1.1_1.1.1o-1_amd64.deb
sudo dpkg -i libssl1.1_1.1.1o-1_amd64.deb

Also here is where you can grab updated urls in case the one above turns into a 404:

https://packages.debian.org/sid/amd64/libssl1.1/download

Jared
  • 351
  • 1
    Found a working link at https://ubuntu.pkgs.org/18.04/ubuntu-main-amd64/libssl1.1_1.1.0g-2ubuntu4_amd64.deb.html – fenollp Apr 27 '23 at 13:40
  • To obtain working link for ubuntu 22.04 i used this link: https://packages.ubuntu.com/focal/amd64/libssl1.1/download – user2586441 Mar 05 '24 at 19:25
4

The origin of the problem for me was that I lost grub-customizer when upgrading to 22.04. If you had the same issue, this solution might be better (credit goes to vachaj11 from https://ubuntuforums.org/showthread.php?t=2474284&page=2&p=14095298#post14095298)

1. Reinstall grub-customizer

You will have to manually add the source ppa which you can do by running:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

Now try to install grub-customizer using:

sudo apt install grub-customizer

There is a chance this might fail because apt tries first to remove the broken linux-image... package (and fails, ending the whole process) before it installs grub-customizer. If that is the case, you will have to temporarily flag the package linux-image... as uninstalled instead of half-installed. You can do this for instance by directly modifying corresponding entry in /var/lib/dpkg/status from half-installed to config-files. Open in gedit using:

sudo gedit /var/lib/dpkg/status

Search for linux-image-5.13.0-46-generic (your version might be different, it's the package than can't be uninstalled). From the end of the line Status: delete half-installed and replace it with config-files. Now save the file and:

sudo apt install grub-customizer

should complete without fail.

2. Open grub-customizer

Now repair the grub if it is in any way broken. In my case after opening grub-customizer I was greeted with option to update the grub which I did. I also reordered as I wanted. Also among other things it merged duplicite entries in grub which I previously saw.

3. Uninstall the broken package

If you previously changed the status of linux-image... to config-files, you will have to revert it back to half-installed so apt recognises that something is broken with it. Now run:

sudo apt autoremove

which should finally remove the package.

jBilbo
  • 141
  • This allowed me to sole my issue. One remark, at step 3 change "half-install" with "half installed" – Pascal Jan 10 '23 at 22:24
3

I encountered the same problem at ubuntu22.04, and my solution is as follows:

1.

wget https://debian.mirror.ac.za/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0%2Bdeb11u1_amd64.deb

you can also choose the other from there, but make sure it can be used to you PC https://debian.mirror.ac.za/debian/pool/main/o/openssl/

Search for libssl1.1_1

2.sudo dpkg -i libssl1.1_1.1.1w-0%2Bdeb11u1_amd64.deb

got it!

0

manual install libssl1.1 fix my problem.

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb

sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb

vinada
  • 9
0

Thanks @JakobWeimar, @vinada for the answers, but before these answers were posted, I already did something else to my system. If the above answers do not work, you may try this answer (I would recommend using the other answers though since the install of libcrypto would be cleaner.)

From Ubuntu 18.04: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory, I went to symlink the libcrypto.so.1.1 in /snap/core20/current/lib/x86_64_linux_gnu to /usr/lib/x86_64_linux_gnu, like so

ln -s /snap/core20/current/lib/x86_64_linux_gnu/libcrypto.so.1.1 /usr/lib/x86_64_linux_gnu/libcrypto.so.1.1

Note, if you have plocate/locate installed in your system, you should go check for the directories of libcrypto.so.1.1 before symlinking, so that you will use the correct files.

Afterwards, I went to re-install libcrypto and libssl from apt (to avoid any problems that may arise from using such a method to access the libcrypto library).

Thanks

LCZ
  • 293
0

Manual install from this site resolved any 404 not found issues:

wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.0l-1~deb9u6_amd64.deb