You get this error if you have more than one instance trying to install or remove. For example, if you have Synaptic open- then you also try to instlal from Terminal.
You can only ever have one Lock on the dpkg frontend at a time.
2 Likes