centOS5 install git

2 篇文章 0 订阅

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5:

$ sudo yum install git
Setting up Install Process
Parsing package install arguments
No package git available.
Nothing to do

This tells you that the package repositories that yum knows about don't contain the required rpms (RPM Package Manager files) to install git. This is presumably because CentOS 5 is based on RHEL 5, which was released in 2007, before git was considered a mature version control system. To get around this problem, we need to add additional repositories to the list that yum uses (We're going to add the RPMforge repository, as perthese instructions).

This assumes you want the i386 packages. Test by running uname -i. If you want the x86_64 packages, replace all occurrences of i386 with x86_64 in the following commands

First, download the rpmforge-release package:

$ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

Next, verify and install the package:

$ rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
$ rpm -K rpmforge-release-0.5.2-2.el5.rf.i386.rpm
$ rpm -i rpmforge-release-0.5.2-2.el5.rf.i386.rpm

And now we should be able to install git:

$ sudo yum install git-gui

yum will work out the dependancies, and ask you at relevant points if you want to proceed. Press y for Yes, andn or return for No.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值