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
  • 65,804
  • 7
  • 115
  • 169
Chris
  • 13

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
  • 111,893