Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 a RHEL6 development server, I have experience with Ubuntu but this is my first time working with RHEL (I'm a developer trying to fill in for a recently departed Linux Sysadmin).

I've set up two additional repos (EPEL and IUS) for other packages needed for a Magento install. Output of yum repolist:

[root@box]# yum repolist
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
repo id              repo name                                        status
epel                 Extra Packages for Enterprise Linux 6 - x86_64   7,841
ius                  IUS for RHEL 6Server - x86_64                    135

Most of what I've read indicates a simple 'yum install git' should work with EPEL enabled, but I get the dreaded

[root@box]# yum install git
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
No package git available.
Error: Nothing to do

Same goes for git-daemon, etc.

I've tracked down a number of git RPMs such as this one at repoforge but they require a train of dependencies that seems to never end.

I've also toyed with compiling it manually but the rabbit hole to get make working seems to go even deeper.

I'm convinced there's a simple oversight somewhere keeping me from being able to install from the EPEL repo, but I'm a rookie at all this. Thanks in advance for help/pointers/additional resources.

share|improve this question
up vote 4 down vote accepted

It's a problem with your YUM repo for the actual distribution... It doesn't appear as though you have a "base" repository, based on your yum repolist command output. I suppose you could just download it as well...

[root@Kitteh ~]# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * update:
repo id                             repo name                                                                 status
base                                CentOS-6 - Base                                                           6346
epel                                Extra Packages for Enterprise Linux 6 - x86_64                            7858
extras                              CentOS-6 - Extras                                                            4
rpmforge                            Red Hat Enterprise 6 - - dag                                 4445
update                              CentOS-6 - Updates                                                         665

...and proof that GIT is part of the base repository...

[root@Kitteh ~]# yum info git
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * update:
Installed Packages
Name        : git
Arch        : x86_64
Version     : 1.7.1
Release     : 2.el6_0.1
Size        : 15 M
Repo        : installed
From repo   : anaconda-CentOS-201112091719.x86_64
Summary     : Fast Version Control System
URL         :
License     : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an
            : unusually rich command set that provides both high-level operations
            : and full access to internals.
            : The git rpm installs the core tools with minimal dependencies.  To
            : install all git packages, including tools for integrating with other
            : SCMs, install the git-all meta-package.
share|improve this answer
This definitely makes sense; I've had to piecemeal the RHEL server with practically no prior experience with repos/rpms. Blame Aptitude for making it too easy elsewhere. In /etc/yum.repos.d/ I have the following: rhel-source.repo, epel-testing.repo, epel.repo, ius.repo, redhat.repo. The epel* and ius are ones I created manually, but the redhat and rhel-source were already present after the server install. What would be the best method to ensure they're enabled, assuming those are the base repos you mention? – JR.Xyza Oct 1 '12 at 21:17
The RPM you linked is similar to others I've tried; missing dependencies (perl-Git, etc)... could this also be because the base repo is misconfigured? – JR.Xyza Oct 1 '12 at 21:24
Do you have a RHEL subscription on this server? – ewwhite Oct 1 '12 at 21:25
I believe that we do, yes. – JR.Xyza Oct 1 '12 at 21:27
To fix the repo subscriptions, go to the RHN management page for this server and subscribe it to the appropriate channel. Then run rhn-check. If that fails, just open a ticket with RH. You have support, after all! – MikeyB Oct 1 '12 at 21:34

try this:

# rpm -q git

if this won't return anything, try following

# yum clean all
# yum install git

also make run this to see what's included/excluded in your repos:

# grep -iE "^exclude|^include" /etc/yum.repos.d/*.repo

UPDATE: (aka another way)

# rpm -ivh
share|improve this answer
No dice on the clean/install attempt, still no git package found. No grep result for either exclude/include either. – JR.Xyza Oct 1 '12 at 21:26
look at updated section – alexus Oct 1 '12 at 21:41
Thanks, but same outcome as downloading/installing the RPM directly (IE: failed dependencies) – JR.Xyza Oct 1 '12 at 22:51
Which dependencies exactly? (install it too) – alexus Oct 2 '12 at 14:55
Too numerous to list, but the issue was the base Repo was missing due to a faulty install. Thanks for trying! – JR.Xyza Oct 2 '12 at 20:44

Your Answer


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.