Problems with upgrade from 18.04LTS to 20.04LTS

Asked by John MacMenigall

Upgrade from 18.04LTS to 20.04LTS did not complete (for whatever reason).

If I try to run a partial upgrade,to correct it, I get the error message (1) "installed linux-image-4.15.0-111-generic package post-removal script subprocess returned error exit status 1" and (2) "The upgrade has aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a)." which merely closes down the upgrade process.

I can't install anything else as I get the same error msg as (1) above and the install aborts.

How do I correct this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes, what is the full output of the commands

uname -a
lsb_release -crid
sudo dpkg --audit
sudo dpkg --configure -a

Revision history for this message
John MacMenigall (fred575) said :
#2

Manfred
Thank you for this, I ran the diagnostic questions & the outputs are as follows:

fred@fred-ThinkCentre:~$ uname -a
Linux fred-ThinkCentre 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
fred@fred-ThinkCentre:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
fred@fred-ThinkCentre:~$ sudo dpkg --audit
[sudo] password for fred:
The following packages are only half installed, due to problems during
installation. The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
 linux-image-4.15.0-111-generic Signed kernel image generic

fred@fred-ThinkCentre:~$ sudo dpkg --configure -a
fred@fred-ThinkCentre:~$

I don't think 'the installation can probably be completed by retrying it' as I've tried that! I've NOT tried the 'remove' option, might that work?

Thanks once again.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What is the output of the commands

dpkg -l | grep 4.15.0-111
apt-cache policy linux-image-4.15.0-111-generic
sudo apt install --reinstall linux-image-4.15.0-111-generic -f
sudo dpkg --remove linux-image-4.15.0-111-generic

Revision history for this message
John MacMenigall (fred575) said :
#4

Manfred - Output as follows:

fred@fred-ThinkCentre:~$ dpkg -l | grep 4.15.0-111
rH linux-image-4.15.0-111-generic 4.15.0-111.112 amd64 Signed kernel image generic
rc linux-modules-4.15.0-111-generic 4.15.0-111.112 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-111-generic 4.15.0-111.112 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
fred@fred-ThinkCentre:~$ apt-cache policy linux-image-4.15.0-111-generic
linux-image-4.15.0-111-generic:
  Installed: 4.15.0-111.112
  Candidate: 4.15.0-111.112
  Version table:
 *** 4.15.0-111.112 100
        100 /var/lib/dpkg/status
fred@fred-ThinkCentre:~$ sudo apt install --reinstall linux-image-4.15.0-111-generic -f
[sudo] password for fred:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of linux-image-4.15.0-111-generic is not possible, it cannot be downloaded.
The following packages will be REMOVED
  linux-image-4.15.0-111-generic
0 to upgrade, 0 to newly install, 1 to remove and 21 not to upgrade.
1 not fully installed or removed.
After this operation, 8,411 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 226097 files and directories currently installed.)
Removing linux-image-4.15.0-111-generic (4.15.0-111.112) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-111-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-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-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 7 on /dev/sda1
Found Windows 7 on /dev/sda2
/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 Windows 7 on /dev/sda1
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.15.0-111-generic (--remove):
 installed linux-image-4.15.0-111-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-111-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
fred@fred-ThinkCentre:~$ sudo dpkg --remove linux-image-4.15.0-111-generic
(Reading database ... 226097 files and directories currently installed.)
Removing linux-image-4.15.0-111-generic (4.15.0-111.112) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-111-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-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-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 7 on /dev/sda1
Found Windows 7 on /dev/sda2
/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 Windows 7 on /dev/sda1
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.15.0-111-generic (--remove):
 installed linux-image-4.15.0-111-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-4.15.0-111-generic

Thanks again

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

ok, this didn't help, but it shows, that the culprit probably is not linux-image-4.15.0-111-generic but something else:

/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

The file /etc/grub.d/bin/grubcfg_proxy is not provided by standard Ubuntu, but must come from elsewhere, maybe from grub-customizer.

What is the output of the commands

sudo update-grub
apt-cache policy grub-customizer

Revision history for this message
Manfred Hampl (m-hampl) said :
#6
Revision history for this message
John MacMenigall (fred575) said :
#7

Manfred
Thank you for this and I'm sorry to have taken so long to get back to you.

I ran your other commands and the output is as follows . . .

fred@fred-ThinkCentre:~$ sudo update-grub
[sudo] password for fred:
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-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-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 7 on /dev/sda1
Found Windows 7 on /dev/sda2
/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 Windows 7 on /dev/sda1
fred@fred-ThinkCentre:~$ apt-cache policy grub-customizer
grub-customizer:
  Installed: 5.1.0-2
  Candidate: 5.1.0-2
  Version table:
 *** 5.1.0-2 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status
fred@fred-ThinkCentre:~$

I have also tried the suggestion(s) in the duplicate question and they haven't worked so I'm no further forward.
Any ideas?

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

I am sorry, but I do not know how to help further.
The problem apparently is caused by an old version of grub-customizer from outside Ubuntu.

In my opinion you should ask the provider of that previous version of grub-customizer for help
probably https://launchpad.net/~danielrichter2007/+archive/ubuntu/grub-customizer

What is the output of the commands

sudo updatedb
locate grubcfg
locate libcrypto.so.1.0.0
apt list libssl1*

Revision history for this message
John MacMenigall (fred575) said :
#9

Manfred
Thanks once again

Output is as follows:

fred@fred-ThinkCentre:~$ sudo updatedb
[sudo] password for fred:
fred@fred-ThinkCentre:~$ locate grubcfg
/etc/grub.d/bin/grubcfg_proxy
/usr/lib/grub-customizer/grubcfg-proxy
fred@fred-ThinkCentre:~$ locate libcrypto.so.1.0.0
/snap/core/9665/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core/9804/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1880/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/core18/1885/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/100/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/gnome-3-26-1604/98/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/makemkv/209/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
/snap/makemkv/214/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
fred@fred-ThinkCentre:~$ apt list libssl1*
Listing... Done
libssl1.0.0/now 1.0.2n-1ubuntu5.3 amd64 [residual-config]
libssl1.1/focal,now 1.1.1f-1ubuntu2 amd64 [installed,automatic]
libssl1.1/focal,now 1.1.1f-1ubuntu2 i386 [installed]
fred@fred-ThinkCentre:~$

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#10

You could try one of the suggestions in https://askubuntu.com/questions/1116133/ubuntu-18-04-libcrypto-so-1-0-0-cannot-open-shared-object-file-no-such-file-o

sudo cp /snap/core18/1885/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/
sudo update-grub

or

sudo rm /etc/grub.d/bin/grubcfg_proxy
sudo rm /usr/lib/grub-customizer/grubcfg-proxy
sudo update-grub

As already told, these are foreign files, I do not know anything about them, no warranty given.

Revision history for this message
John MacMenigall (fred575) said :
#11

Manfred
That worked!!! I ran 'sudo cp /snap/core18/1885 . . .' & 'sudo update-grub' & then re-ran the partial upgrade and everything now seems to be working OK.
I think I'll also remove grub-customizer just to be on the safe side.

Thank you once again for your help.

Revision history for this message
John MacMenigall (fred575) said :
#12

Thanks Manfred Hampl, that solved my question.