Saturday, September 14, 2013

Installing git on Ubuntu

"apt-get install git" not necessarily will work, especially if you are behind a proxy. This is how I have done it:
sudo su - root
export http_proxy=http://myusername:mypassword@myproxyhost:myproxyport
apt-get install git

If you get:
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?

then make sure you are root, and eventually if it keep bugging you, just restart the box. This worked for me.

All these things could be self evident for a Linux administrator, but surely some more helpful error messages would not hurt...

No comments: