Upgrade to latest via APT gives error on configure first time

Take a look at How to debug dpkg configure error in subprocess post-installation? - Ask Ubuntu