I also had the same issue, have fixed it [by disabling the webupd8team repositories, but some days ago I went again into the same issue again. Finally, the workaround from Manfred Hampl worked out at the first attempt (actually, on the second attempt, as I forgot to add the '--fix-broken install' apt parameters).
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1806265 Title: package openjdk-8-jre-headless 8u181-b13-1ubuntu0.18.04.1 failed to install/upgrade: trying to overwrite shared '/etc/java-8-openjdk/security/java.security', which is different from other instances of package openjdk-8-jre-headless:amd64 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1806265/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs