dpkg (the lowlevel package manager on Debian based Linux distributions like Debian, UCS or Ubuntu) complains that someone locked its status database:
dpkg: error: dpkg status database is locked by another process
The cause is most probably another dpkg process that is either still running and stuck or it was killed and the lock was not released.
- Check the logs:
Please have a look at the following log files for progress (is still something going on?) and for obvious errors:
tail -f /var/log/dpkg.log
tail -f /var/log/apt/history.log
tail -f /var/log/univention/updater.log
"tail" will show the last part of the given file and "-f" outputs appended data as the file grows, so you can see if something is happening.
- Try to figure out if there is still a dpkg process running. Execute the following command on the command line:
This should return a number that is the process ID of a running dpkg process. If it doesn't return anything, there is no dpkg process running right now. In this case you can run the following command to check if any of the higher-level package management processes are still running:
ps auxf | grep -E 'dpkg|-updater|-upgrade| apt'
This should list any process of univention-upgrade, univention-updater, apt or dpkg.
3a. If there are any processes stuck, try to terminate them:
kill <Process ID>
3b. If there are no processes left, remove the lock file. But this should only be the last resort if nothing else works:
Now try to run dpkg --configure -a again.