In looking at the postinst script /var/lib/dpkg/info/libapache2-mod- security2.postinst, it appears that it is trying to enable the "security2" module, but that module does not exist in /etc/apache2/mods- available, so I don't think it will ever succeed. If you modify that script so that chunk is a no-op, it will succeed and "work", allowing installation of other packages to continue. I don't yet know if there are bad side-effects as I would expect that module to exist.
I commented out the "apache2_invoke..." line and added 'echo "Disabled stuff here"' to make bash happy. It looks like there are quite a few changes with apache2 and it's modules between 14.04 and 16.04, so this workaround may break all the things. Proceed with caution. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1608280 Title: package libapache2-mod-security2 2.9.0-1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/modsecurity-apache/+bug/1608280/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs