尝试安装" CPAN"使用Yum命令[CentOS 7.3(64位)]我收到以下错误:
---> Package glibc.i686 0:2.17-157.el7 will be installed
--> Processing Dependency: glibc-common = 2.17-157.el7 for package: glibc-2.17-157.el7.i686
---> Package kernel-headers.x86_64 0:3.10.0-514.el7 will be installed
---> Package nss-softokn-freebl.i686 0:3.16.2.3-14.4.el7 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.17-157.el7.i686 (cent-7_1-os)
Requires: glibc-common = 2.17-157.el7
Installed: glibc-common-2.17-157.el7_3.4.x86_64 (@updates_latest)
glibc-common = 2.17-157.el7_3.4
Available: glibc-common-2.17-157.el7.x86_64 (cent-7_1-os)
glibc-common = 2.17-157.el7
另一方面,在跑步时:
yum install glibc-2.17-157.el7.i686
它显示,因为我已经更新了包:
Package matching glibc-2.17-157.el7.x86_64 already installed. Checking for update
如何解决这个问题?对于许多Perl模块,抛出相同的错误并需要 glibc-2.17-157.el7.i686 。
下面是一些抛出错误的模块列表(尽管有许多其他软件包抛出相同的错误):
yum install perl-ExtUtils-Embed
yum install perl-ExtUtils-ParseXS
yum install perl-ExtUtils-Install
我也尝试使用源包安装,但没有成功:(
如果我在错误的平台上提问,请指导我(没有下来投票)
答案 0 :(得分:1)
我认为您安装的glibc-common版本高于所需版本。
首先通过
检查是否有要降级的版本yum list --showduplicates glibc
通过
降级glibc *yum downgrade glibc glibc-common glibc-devel glibc-headers
再次安装gcc
yum install gcc
答案 1 :(得分:1)
改变yum回购后它起作用了。我编辑了存储库:
vim /etc/yum.repos.d/CentOS-Base.repo
并添加以下内容:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
以前是:
[cent-7_1-os]
name=CentOS-7_1 - os
#baseurl=http://mhxrpmsrv001sas.dsone.3ds.com/rpms/cent/7_1/$basearch/os/latest/
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1