Ganesh
Ganesh

Reputation: 515

unable to install CPAN using Yum on CentOS 7.3

while trying to install "CPAN" using Yum command [CentOS 7.3(64-bit)] I am getting below error:

---> 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

Now on other hand when in run:

 yum install glibc-2.17-157.el7.i686

It shows since I have already updated package:

Package matching glibc-2.17-157.el7.x86_64 already installed. Checking for update

how to work around this? for many of the Perl Modules is throws same error and requires glibc-2.17-157.el7.i686.

Below are list of some modules which throws the error (though there are many other packages which are throwing same error):

yum install perl-ExtUtils-Embed
yum install perl-ExtUtils-ParseXS
yum install perl-ExtUtils-Install

I have also tries to install using source packages, but no success :(

Please guide me if I am asking at wrong platform (No down votes plz)

Upvotes: 5

Views: 5851

Answers (2)

Ganesh
Ganesh

Reputation: 515

It worked after changing the yum repo. I have edited the repository:

vim /etc/yum.repos.d/CentOS-Base.repo 

And added below lines:

[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

Previously it was :

[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

Upvotes: 2

taiko
taiko

Reputation: 448

I think your glibc-common installed is of higher version than required.

  1. first check if there is a version to downgrade to, by

    yum list --showduplicates glibc
    
  2. downgrade the glibc* by

    yum downgrade glibc glibc-common glibc-devel glibc-headers
    
  3. install gcc again

    yum install gcc
    

Upvotes: 1

Related Questions