4

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.

Thank you.

1

4 Answers 4

7

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.

2
  • Thanks, I'll give it a try.
    – LCZ
    Apr 23 at 7:36
  • 1
    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 at 15:08
1

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
2
  • This is a duplicate of the accepted answer.
    – karel
    Apr 28 at 12:39
  • Also: The link provided is currently a 404
    – logidelic
    Jun 15 at 13:17
1

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-install so apt recognises that something is broken with it. Now run:

sudo apt autoremove

which should finally remove the package.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.