Ubuntu – How to fix kernel issue after upgrading from 18.10 to 19.04

19.04grub2kernel

After upgrading to 19.04 from 18.10 – I've started seeing an error revolving around linux-image-4.18.0-24-generic and seems to cause me from updates as well updating grub of course… Has anyone experienced this or can anyone guide me as to how to repair this issue?

After running this command sudo apt update && sudo apt upgrade I then receive this error in the terminal:

"Do you want to continue? [Y/n] y
(Reading database ... 238003 files and directories currently installed.)
Removing linux-image-4.18.0-24-generic (4.18.0-24.25) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.18.0-24-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 ...
using custom appearance settings
/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.18.0-24-generic (--remove):
 installed linux-image-4.18.0-24-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-4.18.0-24-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Also when attempting to do a partial upgrade it says that kernel isnt installed and fails out

UPDATE:
As requested I am posting the output of each command here

dpkg -S /etc/grub.d/bin/grubcfg_proxy
dpkg-query: no path found matching pattern /etc/grub.d/bin/grubcfg_proxy

ldd /etc/grub.d/bin/grubcfg_proxy
linux-vdso.so.1 (0x00007ffe12df1000)
    libcrypto.so.1.0.0 => not found
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4ed9660000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4ed9646000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4ed945b000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4ed930d000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4ed9867000)


apt-cache policy grub-customizer - **grub-customizer:
  Installed: 5.1.0-1
  Candidate: 5.1.0-1
  Version table:
 * 5.1.0-1 500
        500 http://it-mirrors.evowise.com/ubuntu disco/universe amd64 Packages
        100 /var/lib/dpkg/status


which grub-customizer
/usr/bin/grub-customizer

Update 2: After moving both files as suggested here the output of
sudo apt-get upgrade is:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-4.18.0-24-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 8,573 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 237928 files and directories currently installed.)
Removing linux-image-4.18.0-24-generic (4.18.0-24.25) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.18.0-24-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
using custom appearance settings
/etc/grub.d/21_memtest86+_proxy: 3: /etc/grub.d/21_memtest86+_proxy: /etc/grub.d/bin/grubcfg_proxy: not found
Found memtest86+ image: /boot/memtest86+.elf
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-4.18.0-24-generic (--remove):
 installed linux-image-4.18.0-24-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-4.18.0-24-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Best Answer

The analysis of source code says that grubcfg_proxy is related to grub-customizer package.

At first I can't find the reason why it is located in /etc/grub.d/bin/grubcfg_proxy on your system. This was actual for old versions, but not for current versions.
At second it is strange that it tries to load libcrypto.so.1.0.0, while regular Ubuntu 19.04 has libcrypto.so.1.1 (shipped with libssl1.1 package).
The third moment is that grubcfg_proxy file on disco is renamed to grubcfg-proxy and located in /usr/lib/grub-customizer/grubcfg-proxy.

So I'll suggest to move your binary file out the way with

sudo mv /etc/grub.d/bin/grubcfg_proxy ~/

then to be completely sure I'll recommend to purge current version of GRUB Customizer with

sudo apt-get purge grub-customizer

then update GRUB configuration:

sudo update-grub

and finally install upgrades:

sudo apt-get upgrade

If you need to use grub-customizer install its package from official repository with

sudo apt-get install grub-customizer

and use it as before.