无法在 CentOS 6.0 x64 上安装 GIT

Cod*_*oad 12 centos git

我正在尝试通过 RPM 或 YUM 安装 GIT,但我不能。我收到以下错误:

error: Failed dependencies:
        libcrypto.so.10 is needed by git-1.7.1-2.el6.i686
        libcurl.so.4 is needed by git-1.7.1-2.el6.i686
        libexpat.so.1 is needed by git-1.7.1-2.el6.i686
        libssl.so.10 is needed by git-1.7.1-2.el6.i686
        libz.so.1 is needed by git-1.7.1-2.el6.i686
        perl(Error) is needed by git-1.7.1-2.el6.i686
        perl(Git) is needed by git-1.7.1-2.el6.i686
        perl-Git = 1.7.1-2.el6 is needed by git-1.7.1-2.el6.i686
Run Code Online (Sandbox Code Playgroud)

运行时yum install git

root@server [/usr/local/src]# yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.symnds.com
 * extras: mirror.atlanticmetro.net
 * updates: mirror.trouble-free.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-2.el6_0.1 set to be updated
--> Processing Dependency: perl-Git = 1.7.1-2.el6_0.1 for package: git-1.7.1-2.el6_0.1.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-2.el6_0.1.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-2.el6_0.1.x86_64
--> Finished Dependency Resolution
Error: Package: git-1.7.1-2.el6_0.1.x86_64 (updates)
           Requires: perl(Error)
Error: Package: git-1.7.1-2.el6_0.1.x86_64 (updates)
           Requires: perl-Git = 1.7.1-2.el6_0.1
Error: Package: git-1.7.1-2.el6_0.1.x86_64 (updates)
           Requires: perl(Git)
 You could try using --skip-broken to work around the problem
bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf)
bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl)
bandmin-1.6.1-5.noarch has missing requires of perl(services.conf)
exim-4.69-30_cpanel_maildir.x86_64 has missing requires of perl(SafeFile)
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0
Run Code Online (Sandbox Code Playgroud)

回购清单:

repo id                       repo name                                status
base                          CentOS-6 - Base                          5,664+355
extras                        CentOS-6 - Extras                                1
updates                       CentOS-6 - Updates                          991+51
repolist: 6,656
Run Code Online (Sandbox Code Playgroud)

服务器正在运行最新的 WHM/cPanel。

如何解决?

Ste*_*dam 17

正如您在 cPanel 论坛中的这篇文章中所见,cPanel/WHM 选择从源代码安装其自己的 Perl 版本,因此它将 yum 可以在 /etc/yum.conf 中拉入的 perl* 包列入黑名单。

解决方案是暂时忽略 excludes指令,同时 yum 整理 Git 的依赖项:

yum install git --disableexcludes=main --skip-broken
Run Code Online (Sandbox Code Playgroud)


eww*_*ite 2

您发布的第一组错误表明您正在尝试 rpm 安装 32 位版本的 git。不过,这是 64 位系统。

你跑了吗yum install git?它应该已经解决了您的依赖链。使用 清理 yum 缓存yum clean all

如果没有,您将需要安装以下依赖项...

yum install openssl libcurl expat zlib perl-Git perl-Error

尝试git通过yum install git以下方式安装。