For me, this was caused when there was an upgrade to nginx due. The upgrade process required me to tell dpkg whether to replace nginx.conf or not. (NO!). So I think it failed because there was manual input required.
Running 'apt-get upgrade' manually allowed me to do this, and then the system was able to upgrade itself alone in the future.