Linux – Git not found by yum..installed from source but git still not recognized

centosgitlinuxyum

I have a Centos server that I tried to yum install git and git-core and all that and I just consistently got the error message that the git package wasn't found. So I installed it from source following all the instructions over at O'reilly.

When I ran all the commands, the screen looked appropriately busy and the verbose dialog pointed to the fact that an installation occurred in usr/local/bin…but when I run git from the command line or git --help, I get nothing. bash doesn't recognize it.

And why didn't yum find it and just save me the pain of the source install in the first place? Git and access control stuff has now occupied three weeks of my life I can never git back….

Best Answer

Ok, it was not the path. I installed the source of git logged in as root. For some reason git would not run under root. When I exited from root and ran it again, it ran. Go figure. I'm still trying to figure out the world of permissions and access control. I don't understand why it won't run under root, but there it is. It would be awesome if someday Centos could add the git package to yum and make it slightly less painful.