Failed to install Git on CentOS?

I am new to this while trying to install git on my CentOS VPS.

I tried yum install git-core and yum install git , and both results led to No package git-core available. Nothing to do No package git-core available. Nothing to do . I think git not in CentOs repositories.

I tried another method here: http://www.lunix.com.au/blog/install-gitosis-on-centos5/ .

Running rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm gives me a message:

error: skipping http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm - transfer failed - Unknown or unexpected error warning: u 0x9079f18 ctrl 0x907ad30 nrefs != 0 (download.fedora.redhat.com http)

Is there any other way to install git ?

UPDATE

I get the following error after adding the correct repo:

 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package git.i386 0:1.7.4.1-1.el5 set to be updated --> Processing Dependency: perl-Git = 1.7.4.1-1.el5 for package: git --> Processing Dependency: perl(Error) for package: git --> Processing Dependency: perl(Git) for package: git --> Finished Dependency Resolution git-1.7.4.1-1.el5.i386 from epel has depsolving problems --> Missing Dependency: perl(Git) is needed by package git-1.7.4.1-1.el5.i386 (epel) git-1.7.4.1-1.el5.i386 from epel has depsolving problems --> Missing Dependency: perl-Git = 1.7.4.1-1.el5 is needed by package git-1.7.4.1-1.el5.i386 (epel) git-1.7.4.1-1.el5.i386 from epel has depsolving problems --> Missing Dependency: perl(Error) is needed by package git-1.7.4.1-1.el5.i386 (epel) Error: Missing Dependency: perl-Git = 1.7.4.1-1.el5 is needed by package git-1.7.4.1-1.el5.i386 (epel) Error: Missing Dependency: perl(Git) is needed by package git-1.7.4.1-1.el5.i386 (epel) Error: Missing Dependency: perl(Error) is needed by package git-1.7.4.1-1.el5.i386 (epel) You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest The program package-cleanup is found in the yum-utils package. 

I think this might be due to cPanel, so I did yum --disableexcludes=main install git . Then he resolved the dependencies, I let him download the git package, but then it fails:

 warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6 GPG key retrieval failed: [Errno 5] OSError: [Errno 2] No such file or directory: /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL 
+4
source share
1 answer

What version of CentOS are you using?

β€œno package found” means you did not configure the correct repository, or you did not configure the repository correctly

Your error message "skipping ..." also points in that direction.

You need google "CentOS repository for Git" ...

this gives the following result: http://www.davegardner.me.uk/blog/2010/01/29/setting-up-git-on-centos-5-server/

It looks like you need to set up the EPEL repository as shown on this page.

+4
source

Source: https://habr.com/ru/post/1383520/


All Articles