This error can arise due to many different reasons..one main reason is trying to install 2 applications at same time for example Installing application from ubuntu software center and also via ppa from terminal.In linux / ubuntu ....install one application at a time.
For more information visit Ubuntu Forums : https://askubuntu.com/questions/154...ion-directory-var-lib-dpkg-is-another-process
Try typing "dpkg --help" or "man dpkg" for help.
Almost all Linux programs have a help facility built into them '--help' and also have an entry in the help manuals 'man ....'.
Please close all open programs and then restart your computer.
Once you have booted and logged in, open a terminal and then install lamp-server via apt. You must be connected to internet before you issue this command. Do not start another update or similar process at the same time.
If you still get the same error, go to /var/apt/ and delete the lock file. Then rerun the apt install command once more.
It is not difficult but some prior knowledge is useful.