在CentOs上安装Git

我想在CentOs上安装git,我正在运行这个命令
yum install git-core

但问题是,我收到这些错误:

Loaded plugins: fastestmirror,security
Loading mirror speeds from cached hostfile
 * epel: mirrors.solfo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed
--> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.e
l6_4.1.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64
--> Finished Dependency Resolution
Error: Package: git-1.7.1-3.el6_4.1.x86_64 (updates)
           Requires: perl-Git = 1.7.1-3.el6_4.1
Error: Package: git-1.7.1-3.el6_4.1.x86_64 (updates)
           Requires: perl(Error)
Error: Package: git-1.7.1-3.el6_4.1.x86_64 (updates)
           Requires: perl(Git)
 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s),'yum check' output follows:
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0
sendmail-cf-8.14.4-8.el6.noarch has missing requires of sendmail = ('0','8.14.4
','8.el6')

我如何设法解决那个问题?

blog article by lishevita提到:

It turns out,Cpanel blocks installation of any perl packages through yum in order to make sure that nothing interferes with their customized packages.
Pain in the NECK!

The good news is that the perl packages that git needs won’t mess with Cpanel,so you can go ahead and install them.
Yum has a spiffy one time option to let you get around the excluded package problem.

yum --disableexcludes=main install git

I searched ALL OVER for this little tidbit,and only found it this 07001.
Hopefully,having this post,and the link back to his post will help improve searches in the future so that you find your answer more easily!! (And thanks,Nick for your post!)

或者您可以使用cPanel自己的git:

root@CentOS-cPanel-box [/]# /usr/local/cpanel/3rdparty/bin/git --version
git version 1.8.3.4

相关文章

linux下开机自启: 在/etc/init.d目录下新建文件elasticsear...
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以...
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用...
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一...
设置时区(CentOS 7) 先执行命令timedatectl status|grep &...
vim /etc/sysconfig/network-scripts/ifcfg-eth0 B...