Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

ftpcount
ftptop
git
gitk
git-shell
git-upload-pack
ftpdctl
ftpwho
git-cvsserver
git-receive-pack
git-upload-archive
prxs
share|improve this question
2  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.