我是新手,试图在我在CentOS上运行的VPS上安装git。
我尝试了yum install git-core
和yum 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
吗?
更新
添加正确的回购后,我收到以下错误:
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 :(得分:4)
您使用的是哪个CentOS版本?
“找不到包”意味着您没有配置正确的存储库,或者您没有正确配置存储库
您的错误消息“跳过...”也指向该方向。
你需要google“CentOS存储库for Git”......
这会产生以下结果:http://www.davegardner.me.uk/blog/2010/01/29/setting-up-git-on-centos-5-server/
看起来您需要配置该页面上显示的EPEL存储库。