0

This question already has an answer here:

I installed mysql server and want to install the mysql client using following code:

apt-get install mysql-client

but I got following error message:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

It looks like the file locked and permission, if it is the case, it does not ask me for a password.

Your help and information is great appreciated.

Regards,

Inung

marked as duplicate by Rmano, Radu Rădeanu, Eric Carvalho, laurent, Avinash Raj Apr 22 '14 at 19:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Why didn't you use software center? – xiaodongjie Apr 22 '14 at 0:34
  • it works now, after I reboot the computer, for some reason, computer locked the file to install client, – user3528144 Apr 22 '14 at 1:08
4

You need to use sudo to run apt-get. You can install the mysql client with:

sudo apt-get update
sudo apt-get install mysql-client

Not the answer you're looking for? Browse other questions tagged or ask your own question.