2011-11-28 150 views
4

我对此很陌生,试图在我的CentOS上运行的VPS上安装git。在CentOS上安装Git失败?

我试过yum install git-coreyum install git,两者都产生了No package git-core available. Nothing to do。我想git不在CentOs回购。

我在这里尝试了另一种方法:http://www.lunix.com.au/blog/install-gitosis-on-centos5/

运行rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm给我的留言:

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)

有另一种方式来安装git

UPDATE

我得到以下错误在正确的回购后添加:

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. 

我想,这可能是由于的cPanel,所以我做了yum --disableexcludes=main install git。然后它解决了依赖关系,我让它下载git包,但然后失败:

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 
+0

你可以从源代码构建它。但是我非常怀疑CentOS没有可用的git包。 – ThiefMaster

+0

@ThiefMaster我做了'yum install git',它说theres没有发现git包... – Nyxynyx

+0

这意味着你没有配置正确的存储库,或者你没有正确配置存储库 – Tilo

回答

4

你正在使用哪个CentOS版本?

“没有发现包装”是指你没有配置正确的存储库,或者没有配置正确库

你的错误信息“跳绳......”也指向这个方向努力。

您需要谷歌“的CentOS存储库的Git” ......

这会产生这样的结果:http://www.davegardner.me.uk/blog/2010/01/29/setting-up-git-on-centos-5-server/

看起来你需要配置EPEL存储库页所示。

+0

谢谢,我试过了,得到了缺少依赖性错误。我尝试过'yum install perl'和'yum install perl-git',但第一个没有做任何事情,第二个说没有perl-git软件包。错误消息更新后。 – Nyxynyx

+0

我正在使用CentOS 5.7 i686 – Nyxynyx

+1

通过编译二进制文件解决了这个问题 – Nyxynyx