When I run this command:
apt-get install git-core
It shows:
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?
When I run this command:
apt-get install git-core
It shows:
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?
Prefix the command with sudo
. This gives you Administrative permissions for one command (runs it as the root
user). You will be prompted for your user password.
Run:
sudo apt-get install git
More information on sudo
here
Note: You may also temporarily log in as root
by typing sudo su
UPDATE
Since the OP posted new information with a different error:
Only one instance of the package manager/updater can be running at one time. Make sure you have no other terminals trying to install software, or that your Software Updater isn't trying to install updates. Best way to make sure of this if you're not sure is to restart, then run the command in the terminal before you do anything else.
UPDATE 2
git-core
is now an obsolete package in the PPA. The package has been renamed to simply git
. I have updated my answer and link accordingly.
sudo
as insudo apt-get install git-core
? – Peachy Oct 25 '12 at 18:05