Unable to lock the administration directory / Could not open lock file

This occurs because you are using a normal user account to run the installation. Simply install it using the sudo to install any package as a root user.

sudo apt-get update && sudo apt-get upgrade

The update and upgrade of the system will run now without errors