0

My goal is to try and install git on a RHEL 6 machine.

I've seen the post here: How can I install git on RHEL 6?

And the answer refers to a download link that appears part of centOS: http://mirror.anl.gov/pub/centos/6.3/os/x86_64/Packages/git-1.7.1-2.el6_0.1.x86_64.rpm

I am hesitant to use such a link as it is an outdated version of Git, and more importantly, I was under the impression that I might clobber one package from the wrong repository with what I have on my machine if I use something from Fedora or CentOS.

Indeed, I got this impression from the information describing the EPEL software repository.

From http://fedoraproject.org/wiki/EPEL

EPEL packages are usually based on their Fedora counterparts and will never conflict with or replace packages in the base Enterprise Linux distributions.

However, following the overall advice from that linked serverfault post, I need to install the "base" repository for RHEL.

How can I do this?

For what it's worth, here is my "repolist":

$ yum repolist
Plugin "product-id" can't be imported
Plugin "subscription-manager" can't be imported
Loaded plugins: refresh-packagekit, security
repo id                                                   repo name                                                                                        status
epel                                                      Extra Packages for Enterprise Linux 6 - x86_64                                                   8,220
repolist: 8,220
User7391
  • 143
  • 1
  • 2
  • 6

3 Answers3

6

Your system is having some sort of problem with your Red Hat subscription. Make sure you have an active entitlement assigned to the machine, and if you do, contact Red Hat to resolve the problem.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
4

You don't seem to have the system registered with RHN. If you have RHN credentials, please do rhn_register and then proceed the set up.

Also, yum repolist should include the base repository for RHEL6 which I don't see here. Anyway, can you do the registration part and see whether you get the base repo. I doubt it has anything to do with it, but let's do it for sake of posterity.

Installing git is absolutely straight-forward, just like yum install -y git.

If all else fails and you are a customer of Red Hat, just open a case.

Soham Chakraborty
  • 3,534
  • 16
  • 24
3

Do you have Red Hat support? If you do not, you'll not be able to get the official Red Hat package. If you do, then I'd contact RedHat support and request them to help you on fixing this.

If you want to experiment, I'd use the Centos equivalent of the package. Centos of course is RedHat publically compiled without the proprietary stuff. Download it from the Centos website, and use rpm to install it. Not as nice as yum but do-able.

Another alternative is to get the package from a Fedora site. However, this version would be less likely than the Centos version to be compatible.

You last alternative is to download the sources and compile it and install it yourself.

mdpc
  • 11,698
  • 28
  • 51
  • 65