5

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)

Ganesh
  • 505
  • 2
  • 9
  • 26
  • Try to check what version you have of glibc, maybe reinstalling them will help. Would be good to know what you have installed there with "rpm -qa | grep glibc" – carlosn Jul 18 '17 at 11:34
  • 3
    Please provide the full version of the glibc installed now by running `rpm -qa | grep glibc` It looks like you have mis-matched versions from different repos which is causing your problem. – user3788685 Jul 19 '17 at 17:43
  • what command are you using to install cpan ? – taiko Jul 22 '17 at 20:25
  • yum install perl-CPAN – Ganesh Jul 24 '17 at 05:59

2 Answers2

2

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
Ganesh
  • 505
  • 2
  • 9
  • 26
1

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
    
taiko
  • 438
  • 1
  • 8
  • 20