我正在尝试使用 yum 命令安装 git
以下是错误日志
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Running transaction check
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
---> Package perl-Error.noarch 1:0.17010-1.el5 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: 1:perl-Error-0.17010-1.el5.noarch
---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64
---> Package perl-TermReadKey.x86_64 0:2.30-4.el5 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-TermReadKey-2.30-4.el5.x86_64
--> Finished Dependency Resolution
Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)
Requires: libssl.so.6()(64bit)
Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)
Requires: libexpat.so.0()(64bit)
Error: Package: perl-Git-1.8.2.1-1.el5.x86_64 (epel)
Requires: perl(:MODULE_COMPAT_5.8.8)
Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)
Requires: libcrypto.so.6()(64bit)
Error: Package: perl-TermReadKey-2.30-4.el5.x86_64 (epel)
Requires: perl(:MODULE_COMPAT_5.8.8)
Error: Package: 1:perl-Error-0.17010-1.el5.noarch (epel)
Requires: perl(:MODULE_COMPAT_5.8.8)
Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)
Requires: libcurl.so.3()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
命令yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
repo id repo name status
epel Extra Packages for Enterprise Linux 5 - x86_64 7,351
rpmforge RHEL 6Server - RPMforge.net - dag 11,275
repolist: 18,626
请帮助我安装并解决这些缺失的依赖项
uname --kernel-release
2.6.32-279.el6.x86_64
答案1
尝试禁用 RPMForge 存储库
执行如下命令:
$ sudo yum --disablerepo=rpmforge install git
存储库 EPEL 和 RPMForge 相处得不太好。
将 EPEL6 存储库与 EPEL5 混合使用?
如果上述方法不能解决问题,那么您可能将 EPEL6 存储库与 CentOS 5 安装混合在一起。在查看 CentOS 5 安装时,我有以下存储库:
$ yum repolist
Loaded plugins: fastestmirror
repo id repo name status
base CentOS-5 - Base 3,641
convirt ConVirt repository 4
convirt-dep ConVirt Dependencies 7
elrepo ELRepo.org Community Enterprise Linux Repository - el5 412
extras CentOS-5 - Extras 270
rpmforge RHEL 5 - RPMforge.net - dag 11,275
updates CentOS-5 - Updates 447
repolist: 16,056
git
查看我在 RPMForge 之外拥有哪些版本:
$ sudo yum --disablerepo=rpmforge list all git*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.nexcess.net
* elrepo: elrepo.org
* extras: centos.mirrors.tds.net
* updates: mirrors.einstein.yu.edu
Installed Packages
git.x86_64 1.7.10.4-1.el5.rf installed
上面显示,如果我禁用 RPMForge,git
我的存储库组合中唯一可用的版本是来自 RPMForge 的版本,最新版本是 1.7。
鉴于此,我猜测您似乎正在混合 CentOS 6 的软件包。
参考
答案2
我正在处理的 CentOS 6 服务器上的问题是安装了 EPEL 5 我通过以下命令发现了这个问题。
sudo yum repolist
我通过以下命令解决了这个问题:
wget http://mirror.umd.edu/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
sudo yum remove epel-release
sudo rpm -ivh epel-release-6-8.noarch.rpm --test
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum update