How to install Git on Ubuntu?
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.
Related videos on Youtube
Manoj Chauhan
Updated on September 18, 2022Comments
-
Manoj Chauhan almost 2 years
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?
-
Manoj Chauhan over 11 yearsplzz help me whtat to do
-
-
Manoj Chauhan over 11 yearsnothing happening...
-
Kyle Macey over 11 yearsWhat do you mean by "Nothing Happening"? Are you getting the same error? Are you getting something else? If so, edit your question and post the new results.
-
Manoj Chauhan over 11 yearsmanu@manu-G31M-ES2L:~$ sudo apt-get install git-core [sudo] password for manu: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
-
Kyle Macey over 11 years@ManojChauhan Check my edit
-
Manoj Chauhan over 11 yearsthanxx its working ..