0

Installation of python-devel fails with attached message

Configuration is as follows: - CentOS 7.2 - Python 2.7 Installed

  1. I re-ran with yum load as suggested in output and it failed with same message.
  2. yum info python ==> Installed package python 2.7.5 34.el7
  3. yum info python-devel ==> NOT installed. Available 2.7.5 48.el7
  4. yum deplist python-devel ==> dependency on python2.7.5-48.el7
  5. Tried to install Python2.7.5-48.el7 wih "yum update python" and it fails with same error message as python-devel install.

Sudhir

yum install -y python-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.sonic.net
* epel: ftp.linux.ncsu.edu
* extras: mirror.cogentco.com
* updates: www.gtlib.gatech.edu
Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.7.5-48.el7 will be installed
--> Processing Dependency: python(x86-64) = 2.7.5-48.el7 for package: python-devel-2.7.5-48.el7.x86_64
--> Running transaction check
---> Package python.x86_64 0:2.7.5-34.el7 will be updated
---> Package python.x86_64 0:2.7.5-48.el7 will be an update
--> Processing Dependency: python-libs(x86-64) = 2.7.5-48.el7 for package: python-2.7.5-48.el7.x86_64
--> Running transaction check
---> Package python-libs.x86_64 0:2.7.5-34.el7 will be updated
---> Package python-libs.x86_64 0:2.7.5-48.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================ Package Arch Version Repository Size

Installing:
python-devel                         x86_64                         2.7.5-48.el7                          base                         393 k
Updating for dependencies:
python                               x86_64                         2.7.5-48.el7                          base                          90 k
python-libs                          x86_64                         2.7.5-48.el7                          base                         5.6 M

Transaction Summary
==============================================================================================================================================
Install  1 Package
Upgrade             ( 2 Dependent packages)

Total size: 6.1 M
Downloading packages:
Running transaction check
ERROR with transaction check vs depsolve:
python(abi) = 2.6 is needed by (installed) python-argparse-1.2.1-2.1.el6.noarch
python(abi) = 2.6 is needed by (installed) redhat-upgrade-tool-1:0.7.22-3.el6.centos.noarch
** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
epel-release-7-6.noarch is a duplicate with epel-release-7-5.noarch
grep-2.20-3.el6_7.1.x86_64 has missing requires of libpcre.so.0()(64bit)
python-argparse-1.2.1-2.1.el6.noarch has missing requires of python(abi) = ('0', '2.6', None)
1:redhat-upgrade-tool-0.7.22-3.el6.centos.noarch has missing requires of preupgrade-assistant >= ('0', '1.0.2', '4')
1:redhat-upgrade-tool-0.7.22-3.el6.centos.noarch has missing requires of python(abi) = ('0', '2.6', None)
Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx.2017-02-13.16-01.jUFBE4.yumtx
2
  • Did you rerun it as the error message suggests? Please give us proper clues instead of error dumps. Commented Feb 14, 2017 at 2:15
  • 1. I reran with yum load-transaction but it fails with same error message Commented Feb 14, 2017 at 13:56

3 Answers 3

3

From the yum documentation, here's the safest way to handle each of your 5 errors:

First remove duplicates and resolve any errors after running this:

package-cleanup --cleandupes

If the above comes with a missing package-cleanup error, then run this first:

yum install yum-utils

Then address the other 4 errors with:

yum reinstall grep-*

where grep-* is the package name as shown in the error message. I abbreviated the rest of the grep version name with * in the command above.

Repeat the above command for the 3 other packages that were indicated as missing. If yum command gives you errors, then try this for just that one package:

rpm -ivh --force grep-*

Then finally re-run the yum command from the original error message.

At any point you want to clean up leftover mess, run this command:

yum clean all
package-cleanup --problems

And follow directions. For further reference, look up documentation with

man yum.conf
Sign up to request clarification or add additional context in comments.

Comments

0

Removed packages python-argparse and redhat-upgrade-tool.

Then did a yum install python-devel and it succeed's this time. I am thinking there is a hard dependency for those 2 packages on older python 2.6.

Sudhir Nallagangu

Comments

0

The problem is that you are on CentOS 7, but have CentOS 6 packages installed.

  • python-argparse-1.2.1-2.1.el6.noarch
  • redhat-upgrade-tool-1:0.7.22-3.el6.centos.noarch

Get a list of all installed el6 packages (rpm -qa | grep el6) and remove them or update them to their el7 equivalents. You should be able remove argparse, since it's in the 2.7 standard library.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.