Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
209 views
in Technique[技术] by (71.8m points)

centos5 - How can git be installed on CENTOS 5.5?

How can I install git on CENTOS 5.5 machine? I tried to install it from yum but got following msg.

root@host [~]# sudo yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: centos.mirrors.tds.net
 * base: mirror.ubiquityservers.com
 * extras: mirrors.serveraxis.net
 * updates: pubmirrors.reflected.net
addons                                                   |  951 B     00:00
base                                                     | 2.1 kB     00:00
extras                                                   | 2.1 kB     00:00
updates                                                  | 1.9 kB     00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package git available.
Nothing to do
root@host [~]#
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you are using CentOS the built in yum repositories don't seem to have git included and as such, you will need to add an additional repository to the system. For my servers I found that the Webtatic repository seems to be reasonably up to date and the installation for git will then be as follows:

# Add the repository
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

# Install the latest version of git
yum install --enablerepo=webtatic git-all

To work around Missing Dependency: perl(Git) errors:

yum install --enablerepo=webtatic --disableexcludes=main  git-all

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...