运行时出现以下错误:它不知何故缺少 perl 依赖项,我不确定是否需要更新 perl 或删除某些内容作为解决方法!
yum 安装 git
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package git.i386 0:1.7.11.3-1.el5.rf set to be updated
--> Processing Dependency: perl-Git = 1.7.11.3-1.el5.rf for package: git
--> Processing Dependency: perl(DBI) for package: git
--> Processing Dependency: perl(Git) for package: git
--> Running transaction check
---> Package git.i386 0:1.7.11.3-1.el5.rf set to be updated
--> Processing Dependency: perl(DBI) for package: git
---> Package perl-Git.i386 0:1.7.11.3-1.el5.rf set to be updated
--> Processing Dependency: perl(SVN::Ra) for package: perl-Git
--> Processing Dependency: perl(SVN::Delta) for package: perl-Git
--> Processing Dependency: perl(SVN::Client) for package: perl-Git
--> Processing Dependency: perl(YAML::Any) for package: perl-Git
--> Processing Dependency: perl(SVN::Core) for package: perl-Git
--> Running transaction check
---> Package git.i386 0:1.7.11.3-1.el5.rf set to be updated
--> Processing Dependency: perl(DBI) for package: git
---> Package perl-Git.i386 0:1.7.11.3-1.el5.rf set to be updated
--> Processing Dependency: perl(SVN::Ra) for package: perl-Git
--> Processing Dependency: perl(SVN::Delta) for package: perl-Git
--> Processing Dependency: perl(SVN::Client) for package: perl-Git
--> Processing Dependency: perl(SVN::Core) for package: perl-Git
---> Package perl-YAML.noarch 0:0.72-1.el5.rf set to be updated
--> Finished Dependency Resolution
perl-Git-1.7.11.3-1.el5.rf.i386 from rpmforge has depsolving problems
--> Missing Dependency: perl(SVN::Ra) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
git-1.7.11.3-1.el5.rf.i386 from rpmforge has depsolving problems
--> Missing Dependency: perl(DBI) is needed by package git-1.7.11.3-1.el5.rf.i386 (rpmforge)
perl-Git-1.7.11.3-1.el5.rf.i386 from rpmforge has depsolving problems
--> Missing Dependency: perl(SVN::Core) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
perl-Git-1.7.11.3-1.el5.rf.i386 from rpmforge has depsolving problems
--> Missing Dependency: perl(SVN::Client) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
perl-Git-1.7.11.3-1.el5.rf.i386 from rpmforge has depsolving problems
--> Missing Dependency: perl(SVN::Delta) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
git-1.7.11.3-1.el5.rf.i386 from rpmforge has depsolving problems
--> Missing Dependency: perl(DBI) is needed by package git-1.7.11.3-1.el5.rf.i386 (rpmforge)
Error: Missing Dependency: perl(SVN::Core) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
Error: Missing Dependency: perl(SVN::Ra) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
Error: Missing Dependency: perl(SVN::Client) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
Error: Missing Dependency: perl(SVN::Delta) is needed by package perl-Git-1.7.11.3-1.el5.rf.i386 (rpmforge)
Error: Missing Dependency: perl(DBI) is needed by package git-1.7.11.3-1.el5.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
The program package-cleanup is found in the yum-utils package.
你能帮我解决这个问题吗?谢谢,
答案1
我遇到了同样的问题。看来 git 所需的 rpmforge 软件包已损坏。我不得不暂时禁用该 yum repo 才能正确下载 git。
yum-config-manager --disable rpmforge
然后尝试使用以下方式安装 git...
yum install git
您可能需要安装另一个 yum repo 来替代 rpmforge,但我不需要。
答案2
尝试添加这个 repo:
http://pkgs.repoforge.org/perl-YAML/perl-YAML-0.72-1.el5.rf.noarch.rpm
然后yum install git
再次运行。
编辑
yum install perl-DBI
如果没有错误,请尝试运行,然后yum install git
再次尝试运行。如果确实出现错误,则可能需要尝试使用 RPM 而不是 yum 进行安装,例如:
wget http://packages.sw.be/git/perl-Git-1.7.3.4-1.el5.rf.i386.rpm
wget http://download.fedora.redhat.com/pub/epel/5/i386/perl-Error-0.17010-1.el5.noarch.rpm
wget http://packages.sw.be/git/git-1.7.3.4-1.el5.rf.i386.rpm
然后
rpm -i perl-Git-1.7.3.4-1.el5.rf.i386.rpm perl-Error-0.17010-1.el5.noarch.rpm git-1.7.3.4-1.el5.rf.i386.rpm
答案3
当您想在 Red Hat/Oracle Linux 服务器上使用 yum 时,如果提示“此系统未在 RHN 注册。”,有一个很棒的选项可以添加免费的 yum 存储库。
在此处了解有关许可和 Red Hat/Oracle Linux 的信息: http://flashdba.com/2012/10/08/this-system-is-not-registered-with-uln-rhn/
在此处了解如何添加公共 Yum 服务器: http://public-yum.oracle.com/
答案4
这对我有用。
yum --nogpgcheck install git -y