I experienced the same error as the OP, after using Ubuntu Software Updater to update from 18.04 to 19.04.
When the update was just about done an was removing old unused linux kernels, the OP's error occurred during a grub configuration step driven by the Updater.
Searching for a remediation I found the OP's post and tried the same steps. As I improvised and found a workaround that was clean, I post it here:
lnx:~$ sudo apt-get install -f
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
breeze-cursor-theme fonts-hack fonts-hack-ttf oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-58-generic linux-image-4.15.0-60-generic
0 to upgrade, 0 to newly install, 2 to remove and 1 not to upgrade.
2 not fully installed or removed.
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 205548 files and directories currently installed.)
Removing linux-image-4.15.0-58-generic (4.15.0-58.64) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-58-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.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.0.0: 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-4.15.0-58-generic (--remove):
installed linux-image-4.15.0-58-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-4.15.0-60-generic (4.15.0-60.67) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-60-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 ...
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.0.0: 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-4.15.0-60-generic (--remove):
installed linux-image-4.15.0-60-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-58-generic
linux-image-4.15.0-60-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
So libcrypto.so.1.0.0
is not found in an expected location by grubcfg_proxy
.
Following the advice of a respondent to the OP:
lnx:~$ sudo locate libcrypto.so.1.0.0
/snap/core/7713/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core/7917/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1192/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/92/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/97/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Which I followed up with:
lnx:~$ for l in $(sudo locate libcrypto.so.1.0.0); do md5sum $l; done
829091982233166cdaa55b41fb353609 /snap/core/7713/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
829091982233166cdaa55b41fb353609 /snap/core/7917/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18403538a12facf8aced1dcfcccef1ba /snap/core18/1192/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18403538a12facf8aced1dcfcccef1ba /snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
829091982233166cdaa55b41fb353609 /snap/gnome-3-26-1604/92/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
829091982233166cdaa55b41fb353609 /snap/gnome-3-26-1604/97/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
md5sum: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: No such file or directory
Ah ha! /usr/lib/x86_64-linux-gnu/
must be the location where grubcfg_proxy
needs to find libcrypto.so.1.0.0
.
Which of the others to cp -p
, ln
or ln -s
to the expected location? The md5 signatures tell me which files are the same bytewise content. Are any the same actual files?
lnx:~$ for l in $(sudo locate libcrypto.so.1.0.0); do ls -il $l; done
2134 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/core/7713/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
2134 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/core/7917/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
5689 -rw-r--r-- 1 root root 2357760 Feb 27 2019 /snap/core18/1192/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
5690 -rw-r--r-- 1 root root 2357760 Feb 27 2019 /snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
165 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/gnome-3-26-1604/92/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
165 -rw-r--r-- 1 root root 2365952 Feb 27 2019 /snap/gnome-3-26-1604/97/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
ls: cannot access '/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0': No such file or directory
The inode numbers in column 1 show which instances of libcrypto.so.1.0.0
, and the hard link count of 1 in column 3 shows symlinks are involved in providing the multiple paths.
I decide I just need to cp -p
one of the files to the correct location to get past the problem. Which of the two different md5 signatures / bytewise different content options do I choose?
After some googling I find that /snap/core/...
is based on ubuntu 16.04, and /snap/core18/...
is based on ubuntu 18.04.
I am leaning toward /snap/core18/.../libcrypto.so.1.0.0
.
It turns out after some checking that /snap/core18/.../libcrypto.so.1.1
and /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
are the same bytewise, so I decide to keep /usr/lib/x86_64-linux-gnu/libcrypto.so.1.*
all ubuntu 18.04.
I copy the file into place and run sudo apt-get install -f
again.
Voila! grubcfg_proxy
is happy and the old kernels are removed.
lnx:~$ sudo cp -p /snap/core18/1223/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
lnx:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
breeze-cursor-theme fonts-hack fonts-hack-ttf oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-58-generic linux-image-4.15.0-60-generic
0 to upgrade, 0 to newly install, 2 to remove and 1 not to upgrade.
2 not fully installed or removed.
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 205548 files and directories currently installed.)
Removing linux-image-4.15.0-58-generic (4.15.0-58.64) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-58-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.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found Windows 10 on /dev/sda1
Found Windows 10 on /dev/sda1
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 on /dev/sda1
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Removing linux-image-4.15.0-60-generic (4.15.0-60.67) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-60-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.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found Windows 10 on /dev/sda1
Found Windows 10 on /dev/sda1
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found linux image: /boot/vmlinuz-4.15.0-66-generic
Found initrd image: /boot/initrd.img-4.15.0-66-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 on /dev/sda1
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
I can now proceed to update from ubuntu 19.04 to 19.10, with only a "crufty" /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
from 18.04 lying around on my disk to perhaps help future package management problems. First, for good measure:
john@jameskb-lnx:~$ sudo apt-get install -f
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
breeze-cursor-theme fonts-hack fonts-hack-ttf oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
Looks like I can clean up a little more ;)
libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
. Please edit your question to tell us a bit more about encryption, if any, in your setup. – user535733 Feb 06 '19 at 15:49locate libcrypto.so.1.0.0
and append the output to your question? – Charles Green Feb 06 '19 at 16:54apt list libssl1*
– Charles Green Feb 06 '19 at 16:56sudo apt install --reinstall libssl1.0.0
to see if this fixes some odd linkage error. – Charles Green Feb 06 '19 at 17:21