我有
$ git --version
git version 2.18.0
$ cat /etc/yum.repos.d/WANdisco-git.repo
[WANdisco-git]
name=WANdisco Distribution of git
baseurl=http://opensource.wandisco.com/rhel/$releasever/git/$basearch
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
$ perl --version
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Copyright 1987-2009, Larry Wall
$ sudo yum -y update git
以错误结束:
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:2.18.0-1.WANdisco.402 will be updated
--> Processing Dependency: git = 2.18.0-1.WANdisco.402 for package: perl-Git-2.18.0-1.WANdisco.402.noarch
---> Package git.x86_64 0:2.20.1-1.WANdisco.428 will be an update
--> Processing Dependency: perl(MediaWiki::API) for package: git-2.20.1-1.WANdisco.428.x86_64
--> Processing Dependency: perl(LWP::UserAgent) for package: git-2.20.1-1.WANdisco.428.x86_64
--> Processing Dependency: perl(HTML::TreeBuilder) for package: git-2.20.1-1.WANdisco.428.x86_64
--> Processing Dependency: perl(DateTime::Format::ISO8601) for package: git-2.20.1-1.WANdisco.428.x86_64
--> Processing Dependency: perl(URI::URL) for package: git-2.20.1-1.WANdisco.428.x86_64
--> Processing Dependency: perl(URI::Escape) for package: git-2.20.1-1.WANdisco.428.x86_64
--> Running transaction check
---> Package git.x86_64 0:2.20.1-1.WANdisco.428 will be an update
--> Processing Dependency: perl(MediaWiki::API) for package: git-2.20.1-1.WANdisco.428.x86_64
---> Package perl-DateTime-Format-ISO8601.noarch 0:0.07-7.el6 will be installed
--> Processing Dependency: perl(Params::Validate) for package: perl-DateTime-Format-ISO8601-0.07-7.el6.noarch
--> Processing Dependency: perl(DateTime::Format::Builder) for package: perl-DateTime-Format-ISO8601-0.07-7.el6.noarch
--> Processing Dependency: perl(DateTime) for package: perl-DateTime-Format-ISO8601-0.07-7.el6.noarch
---> Package perl-Git.noarch 0:2.18.0-1.WANdisco.402 will be updated
---> Package perl-Git.noarch 0:2.20.1-1.WANdisco.428 will be an update
---> Package perl-HTML-Tree.noarch 1:3.23-10.el6 will be installed
---> Package perl-URI.noarch 0:1.40-2.el6 will be installed
---> Package perl-libwww-perl.noarch 0:5.833-5.el6 will be installed
--> Processing Dependency: perl(Compress::Zlib) for package: perl-libwww-perl-5.833-5.el6.noarch
--> Running transaction check
---> Package git.x86_64 0:2.20.1-1.WANdisco.428 will be an update
--> Processing Dependency: perl(MediaWiki::API) for package: git-2.20.1-1.WANdisco.428.x86_64
---> Package perl-Compress-Zlib.x86_64 0:2.021-144.el6 will be installed
--> Processing Dependency: perl(IO::Uncompress::Gunzip) >= 2.021 for package: perl-Compress-Zlib-2.021-144.el6.x86_64
--> Processing Dependency: perl(IO::Compress::Gzip::Constants) >= 2.021 for package: perl-Compress-Zlib-2.021-144.el6.x86_64
--> Processing Dependency: perl(IO::Compress::Gzip) >= 2.021 for package: perl-Compress-Zlib-2.021-144.el6.x86_64
--> Processing Dependency: perl(IO::Compress::Base::Common) >= 2.021 for package: perl-Compress-Zlib-2.021-144.el6.x86_64
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.021 for package: perl-Compress-Zlib-2.021-144.el6.x86_64
---> Package perl-DateTime.x86_64 1:0.5300-3.el6 will be installed
--> Processing Dependency: perl(Class::Singleton) >= 1.03 for package: 1:perl-DateTime-0.5300-3.el6.x86_64
--> Processing Dependency: perl(List::MoreUtils) for package: 1:perl-DateTime-0.5300-3.el6.x86_64
--> Processing Dependency: perl(Class::Singleton) for package: 1:perl-DateTime-0.5300-3.el6.x86_64
---> Package perl-DateTime-Format-Builder.noarch 0:0.8000-2.el6 will be installed
--> Processing Dependency: perl(DateTime::Format::Strptime) for package: perl-DateTime-Format-Builder-0.8000-2.el6.noarch
--> Processing Dependency: perl(Class::Factory::Util) for package: perl-DateTime-Format-Builder-0.8000-2.el6.noarch
---> Package perl-Params-Validate.x86_64 0:0.92-3.el6 will be installed
--> Running transaction check
---> Package git.x86_64 0:2.20.1-1.WANdisco.428 will be an update
--> Processing Dependency: perl(MediaWiki::API) for package: git-2.20.1-1.WANdisco.428.x86_64
---> Package perl-Class-Factory-Util.noarch 0:1.7-5.el6 will be installed
---> Package perl-Class-Singleton.noarch 0:1.4-6.el6 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.021-144.el6 will be installed
---> Package perl-DateTime-Format-Strptime.noarch 0:1.1000-2.el6 will be installed
---> Package perl-IO-Compress-Base.x86_64 0:2.021-144.el6 will be installed
---> Package perl-IO-Compress-Zlib.x86_64 0:2.021-144.el6 will be installed
---> Package perl-List-MoreUtils.x86_64 0:0.22-10.el6 will be installed
--> Finished Dependency Resolution
Error: Package: git-2.20.1-1.WANdisco.428.x86_64 (WANdisco-git)
Requires: perl(MediaWiki::API)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
如何解决这个问题?
答案1
据我所知,WANDisco 似乎已从其 repo 中提取了 2.20 和 2.20.1。
就我个人而言,我一直怀疑为什么每个人都从 WANDisco 获得它;他们似乎没有兴趣公开维护它。
您可以按照此处的指南从源代码进行编译,只需替换版本号:
https://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos
实际的源文件在这里: https://mirrors.edge.kernel.org/pub/software/scm/git/
这是一面可靠的镜子,在许多其他地方也有镜像。