Score:1

Cannot run apt-get upgrade after upgrade to Ubuntu 20.04

cn flag

Recently, I have clicked on the upgrade button to upgrade to Ubuntu 20.04 from 18.04. I think the upgrade didn't finish installing everything for some reason...

The system works fine but, every time I try using apt I get the following errors:

xyz@xyz-laptop:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED
  linux-image-4.15.0-154-generic
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 8,485 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 211024 files and directories currently installed.)
Removing linux-image-4.15.0-154-generic (4.15.0-154.161) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-154-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.4.0-84-generic
Found initrd image: /boot/initrd.img-5.4.0-84-generic
Found linux image: /boot/vmlinuz-4.15.0-156-generic
Found initrd image: /boot/initrd.img-4.15.0-156-generic
Found linux image: /boot/vmlinuz-4.15.0-112-generic
Found initrd image: /boot/initrd.img-4.15.0-112-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Recovery Environment on /dev/sda3
Found Windows Recovery Environment on /dev/sda8
/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-154-generic (--remove):
 installed linux-image-4.15.0-154-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-4.15.0-154-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

I wonder if anyone has any idea about what I can do to solve this issue as I am not sure if I have any backup?

EDIT: More details:

xyz@xyz-laptop:~$ dpkg -l | egrep -v '^ii|rc'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-==========================================-===================================================-============-======================================================================================================
rH  linux-image-4.15.0-154-generic             4.15.0-154.161                                      amd64        Signed kernel image generic
nobody avatar
gh flag
please add `dpkg -l | egrep -v '^ii|rc'` to your question. To many errors sound not good.
N0rbert avatar
zw flag
Does this answer your question? [How to fix kernel issue after upgrading from 18.10 to 19.04?](https://askubuntu.com/a/1168126/66509). Did you have grub-customizer installed before?
cn flag
Just finished checking `dpkg -l | egrep -v '^ii|rc'` : Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend +++-==========================================-===================================================-============-====================================================================================================== rH linux-image-4.15.0-154-generic 4.15.0-154.161 amd64 Signed kernel image generic
user535733 avatar
cn flag
I have seen something similar occur with Rstudio, libssl-related web development, and others. In each case it was non-Ubuntu software bolted onto an LTS that was not properly removed before the release-upgrade. Had to uninstall the non-Ubuntu software, then solve any remaining release-upgrade errors, then install a new version of the non-Ubuntu software that was properly compatible with the new release of Ubuntu.
hu flag
Did you mean "Can run apt-get, but it exists with errors"? Because "cannot run apt..." is surely not the case here.
cn flag
Only `sudo apt upgrade` and `sudo apt install -f` exits with errors, @mikewhatever. The other one `sudo apt update` works.
Score:0
cn flag

DONE! Just finished solving the problem.

Turns out, libcrypto.so.1.0.0 was missing.

I started searching for it with:

xyz@xyz-laptop:~$ sudo locate libcrypto.so.1.0.0
/snap/core/11420/lib/x86_64-linux-gnu/libcrypto.so.1.0.0

then after fining it I started copying it with:

xyz@xyz-laptop:~$ sudo cp /snap/core/11420/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/

And that's it!

I can now upgrade with sudo apt upgrade.

( I got the idea from here: Ubuntu 18.04: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory )

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.