How can I configure yum to use some repository which has git rpms?
5 Answers
Use the EPEL (Extra Packages for Enterprise Linux) repository. The easiest way to enable it is by installing the epel-release
package. Here's how if you have RHEL 5 x86_64:
[root@localhost]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
[root@localhost]# yum install git

- 6,396
- 2
- 42
- 56
-
2I would make sure to install a 64-bit version of git if you're really using a 64-bit system because git is a heavy user of mmap() and loves to have a large address space if the project's getting bigger (during repacking, etc). – knweiss Nov 04 '09 at 20:54
-
Following Cristian's directions, he will get 64-bit if he is on 64-bit architecture. – James May 16 '11 at 17:41
-
If I run `$ rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm` I get `error: skipping http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm - transfer failed - Unknown or unexpected error warning: u 0x1db4cfe0 ctrl 0x1db501a0 nrefs != 0 (download.fedoraproject.org http)` – highBandWidth Oct 12 '12 at 01:12
-
@highBandWidth: your mirror might have some issues. Try to download `epel-release` manually by following the instructions from the EPEL page. – Cristian Ciupitu Oct 12 '12 at 10:45
-
1It seems now you need to do `dl.fedoraproject.org`. – highBandWidth Oct 12 '12 at 15:15
-
I've heard that the `rpm` command from RHEL5 doesn't know about http redirects (to mirrors), so you should use either the direct download link (`dl.fed...`) or download the RPM file using another program, e.g. wget, curl, etc. and then install it. – Cristian Ciupitu Oct 12 '12 at 17:31
-
It's not resolving dependencies automatically, i am seeing this error *Missing Dependency: perl(Git) is needed by package git-1.7.4.1-1.el5.x86_64 (epel)* – ish1301 Jan 16 '13 at 20:07
-
@IshKumar: maybe your mirror is not up to date, so wait a couple of days and try again. Or report the issue as recommended [here](http://fedoraproject.org/wiki/EPEL/FAQ#Where_can_I_find_help_or_report_issues.3F). – Cristian Ciupitu Jan 18 '13 at 12:22
For a more up-to-date version of Git (1.7.2.3 at the time of this writing versus 1.5.5.6 in the EPEL repository), see Andrew Thompson's Webtatic repository:

- 3
- 3

- 261
- 2
- 9
i Suggest you can download the source from offical webpage and to do configure & make & make install instead of use yum. :D

- 27
-
Why? People like the tracking features of using an RPM, is there some other benefit of compiling yourself? – Ken Williams Jul 16 '14 at 14:28
-
Because (make, make install) is the same for every linux System, while the RPMs aren't and have to be changed for every distribution (rhel, ubuntut ....) – eactor Jul 26 '17 at 08:48
Elaborating @Cristian Ciupitu answer it would be possible to do it via yum.repos.d:
Go to https://fedoraproject.org/keys and install the
RPM-GPG-KEY-EPEL
public key by downloading its contents into theRPM-GPG-KEY-EPEL
file and runningrpm --import RPM-GPG-KEY-EPEL
.Create a file
rhel-epel.repo
(choose any name you want) in/etc/yum.repos.d/
Add following content:
[rhel-epel] name=Extra Packages for Enterprise Linux $releasever - $basearch baseurl=http://download3.fedora.redhat.com/pub/epel/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
run
yum install git
.

- 101
- 3
one way i feel it should work /etc/yum.repos.d/same.repo if you give git locate where your looking git packages

- 3,349
- 22
- 29