I'm trying to install git with
apt-get install git
it then says
E: Could not open lock fine /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
How do I get this?
Always do
sudo apt-get <command>
To drop into root,
sudo -i
or sudo su
(sudo -i
is recommended and more proper, but it really doesn't matter)
to get into the you need to type the following command
$ sudo su
when prompted for password enter it.You can also use another command that is
$sudo -i
To execute any command as root just start with sudo
then type the command
You will be asked for your password, the characters won't be shown, not even in dots, so just type the password and hit enter.
I think you should install git with root privilege. You can do it by typing sudo -i
in terminal and then type password if it asks then you can run apt-get install git
.
If root privilege is only the problem then this should work. Hope this works for you.
sudo
Nov 4, 2013 at 5:58