1

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
Hennes
  • 64,768
  • 7
  • 111
  • 168
Chris
  • 13
  • 3
  • 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 07 '12 at 09:42
  • Thanks for your response @DanielBeck. I've added responses to your questions. – Chris Jun 08 '12 at 09:49

1 Answers1

2

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.

Daniel Beck
  • 109,300
  • 14
  • 287
  • 334