Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can git be installed on CENTOS 5.5?

Tags:

git

centos5

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 [~]# 
like image 923
Prakash Avatar asked Sep 23 '10 14:09

Prakash


People also ask

How do I install a new Git?

To do so, Navigate to your command prompt shell and run the following command to make sure everything is up-to-date: sudo apt-get update . To install Git, run the following command: sudo apt-get install git-all . Once the command output has completed, you can verify the installation by typing: git version .


1 Answers

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 
like image 95
rjzii Avatar answered Oct 06 '22 11:10

rjzii