Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Git on my Media Temple (dv) 4.0 server.

I've followed these instructions. It seems to have "installed", as there are a boat-load of files in the /root/git-2012-06-06 directory.

However, when I perform any git command in the server, I receive this message:

git: command not found

My assumption is that something, somewhere is not configured properly, but I have no idea where to start. Could anybody lend a hand / offer some pointers?

I did perform the make install.

The output of which git is /usr/bin/which: no git in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/root/bin)

The output of echo $PATH is /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/root/bin

/usr/local/bin contains:

share|improve this question
Did you forget to make install at the end? What's the output of which git, and the output of echo $PATH? What's the output of the commands you executed? Is there a git in /usr/local/bin? Why are you administering an internet-connected server when you don't know what you're doing? – Daniel Beck Jun 7 '12 at 9:42
Thanks for your response @DanielBeck. I've added responses to your questions. – Chris Jun 8 '12 at 9:49
up vote 2 down vote accepted

Add /usr/local/bin to your path, e.g. by adding the following to ~/.bashrc (assuming bash is your shell):

export PATH=/usr/local/bin:$PATH

More information here. You were essentially hit by the problem I mention here, /usr/local/[s]bin sometimes not being on the PATH.

Alternatively, learn to type the full path to git: /usr/local/bin/git.

share|improve this answer
Terrific. That's worked a dream. Thanks for your help. – Chris Jun 8 '12 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .