4

Due to business decisions, we are having to migrate our RHEL servers to CentOS. RHEL6 to CentOS6 appears very straight forward, but we are having all kinds of errors trying to migrate from RHEL7 to CentOS7. We tried to match the various guides we have found for rhel6 to centos6 conversion, by downloading the following files from the mirrors:

centos-indexhtml-7-9.el7.centos.noarch.rpm
centos-logos-70.0.6-3.el7.centos.noarch.rpm
centos-release-7-4.1708.el7.centos.x86_64.rpm
python-urlgrabber-3.10-8.el7.noarch.rpm
redhat-support-lib-python-0.9.7-6.el7.noarch.rpm
redhat-support-tool-0.9.9-3.el7.noarch.rpm
rpm-4.11.3-25.el7.x86_64.rpm
rpm-build-libs-4.11.3-25.el7.x86_64.rpm
rpm-devel-4.11.3-25.el7.x86_64.rpm
rpm-libs-4.11.3-25.el7.x86_64.rpm
rpm-python-4.11.3-25.el7.x86_64.rpm
yum-3.4.3-154.el7.centos.noarch.rpm
yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm

into a directory.

We have a script that we are using like this:

    cd "$CENTOS7DIR"
rpm --import RPM-GPG-KEY-CentOS-7
yum remove rhnlib abrt-plugin-bugzilla redhat-release-notes* redhat-support-tool redhat-support-lib-python -y
[[ "$(rpm -qa | grep redhat-release-server)" ]] && rpm -e --nodeps redhat-release-server 
rm -fr /usr/share/doc/redhat-release*
[[ "$(rpm -qa | grep subscription-manager)" ]] && subscription-manager clean
[[ "$(rpm -Uvh --force *.rpm)" ]] || { rpm -fr /usr/share/doc/redhat-release* && rpm -Uvh --force *.rpm; }
[ "$(find /etc/yum.conf.rpmnew -mmin +0.6 )" ] && mv /etc/yum.conf.rpmnew /etc/yum.conf
[[ "$(rpm -qa | grep subscription-manager)" ]] && yum remove subscription-manager -y
yum clean all 
yum -y upgrade
grub2-mkconfig -o /boot/grub2/grub.cfg

But when it gets to yum -y upgrade, we have these transaction errors after the new centos7 yum has downloaded all the files necessary for upgrade:

    Transaction check error:
  file /usr/share/man/man5/limits.conf.5.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man5/pam_env.conf.5.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/faillock.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/pam_env.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/pam_exec.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/pam_faillock.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/pam_unix.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/pam_userdb.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64
  file /usr/share/man/man8/pwhistory_helper.8.gz from install of pam-1.1.8-18.el7.i686 conflicts with file from package pam-1.1.8-18.el7.x86_64

Error Summary
-------------

Please what are we doing wrong, and how can we fix this?

  • Looks like you are mixing up 32-bit and 64-bit packages! Was system a 32-bit system and not a 64-bit system – fpmurphy Dec 4 '17 at 20:42
  • Its a 64-bit system. – SinaOwolabi Dec 4 '17 at 21:29
  • Is there no solution applicable? Its driving one nuts. – SinaOwolabi Jan 4 '18 at 8:16
3

Hit the same thing this morning. Run a reinstall:

yum reinstall pam.x86_64

Then you should be able to upgrade the system without issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.