在 CentOS 5.5 上安装 Git

在 CentOS 5.5 上安装 Git

我已经添加了 EPEL 存储库,然后...

# yum install git-core
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.team-cymru.org
 * base: yum.singlehop.com
 * epel: mirrors.servercentral.net
 * extras: mirror.steadfast.net
 * rpmforge: fr2.rpmfind.net
 * updates: pubmirrors.reflected.net
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.i386 0:1.7.3-1.el4.rf set to be updated
--> Processing Dependency: perl-Git = 1.7.3-1.el4.rf for package: git
--> Processing Dependency: libcrypto.so.4 for package: git
--> Processing Dependency: perl(DBI) for package: git
--> Processing Dependency: libssl.so.4 for package: git
--> Processing Dependency: perl(Git) for package: git
--> Running transaction check
---> Package git.i386 0:1.7.3-1.el4.rf set to be updated
--> Processing Dependency: perl-Git = 1.7.3-1.el4.rf for package: git
--> Processing Dependency: perl(DBI) for package: git
--> Processing Dependency: perl(Git) for package: git
---> Package openssl097a.i386 0:0.9.7a-9.el5_4.2 set to be updated
--> Finished Dependency Resolution
git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems
  --> Missing Dependency: perl(DBI) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems
  --> Missing Dependency: perl(Git) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems
  --> Missing Dependency: perl-Git = 1.7.3-1.el4.rf is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
Error: Missing Dependency: perl(DBI) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
Error: Missing Dependency: perl(Git) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
Error: Missing Dependency: perl-Git = 1.7.3-1.el4.rf is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)
 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

但...

# yum install perl-DBI
No package perl-DBI available.
Nothing to do

任何想法?

答案1

所以,

我最近在这台服务器上设置了一个 cpanel 实例,我感到非常惊讶,因为我之前在 CentOS 机器上安装过 git,没有出现任何问题。

因此 cpanel 阻止了所有 perl 软件包的安装或更新,因为他们不希望更新破坏或与其软件包发生冲突。值得庆幸的是 yum 为这种情况提供了一个很好的一次性解决方法。

yum --disableexcludes=主要安装 git

答案2

这里的基本问题是您混合了 RPMforge 和 EPEL 附加存储库。如您所见,它们并不总是兼容的。选择一个并使用它。

答案3

只需从 /etc/yum.conf 文件中删除 perl* 即可。然后重新运行 yum 安装。

确保在安装 git 后记得将其放回 conf 文件中,否则后续的某些更新可能会破坏 cpanel 所需的内容。

相关内容