I just realized I should explain this a bit more. The error message does ask if another process is using the lock, but this could be better explained. Here's a proposal for what it could say instead, that would be much much more useful:
"Apt was unable to lock the package database. This means that either you don't have permission to install/remove packages (check that you are root or are using sudo), or that another program is currently using the database. If you have Adept, Synaptic, or Add/Remove Programs, or another instance of Apt open, you must close them before using apt.
If you are absolutely sure that no program is currently using that database, it is possible that a program crashed while using the database. To remove this program's lock on the database, delete the file /var/lib/dpkg/lock."
This is a lot less likely to confuse and informs the user of their options.
I just realized I should explain this a bit more. The error message does ask if another process is using the lock, but this could be better explained. Here's a proposal for what it could say instead, that would be much much more useful:
"Apt was unable to lock the package database. This means that either you don't have permission to install/remove packages (check that you are root or are using sudo), or that another program is currently using the database. If you have Adept, Synaptic, or Add/Remove Programs, or another instance of Apt open, you must close them before using apt.
If you are absolutely sure that no program is currently using that database, it is possible that a program crashed while using the database. To remove this program's lock on the database, delete the file /var/lib/ dpkg/lock. "
This is a lot less likely to confuse and informs the user of their options.