The error in your log is:
Setting up linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
/etc/kernel/header_postinst.d/dkms:
debconf: unable to initialize frontend: Passthrough
debconf: (Cannot connect to /tmp/aptdaemon-0_mjm70h/debconf.socket: Connection
refused at (eval 17) line 3.)
debconf:
** Tags removed: need-duplicate-check
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1800274
Title:
package shim-signed 1.37~18.04.2+15+1533136590.3beb971-0ubuntu1 failed
to install/upgrade: