安装python-devel失败并附带消息
配置如下: - CentOS 7.2 - 安装了Python 2.7
的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
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
答案 0 :(得分:1)
从yum文档中,这是处理每个错误的最安全方法:
首先删除重复项并在运行此项后解决所有错误:
package-cleanup --cleandupes
如果以上内容缺少包清除错误,请先运行:
yum install yum-utils
然后用以下内容解决其他4个错误:
yum reinstall grep-*
其中grep- *是错误消息中显示的包名称。我在上面的命令中用*缩写了grep版本名称的其余部分。
对指示为缺失的其他3个包重复上述命令。如果yum命令给你错误,那么只针对那个包尝试:
rpm -ivh --force grep-*
然后最后从原始错误消息重新运行yum命令。
在任何时候你想清理剩余的混乱,运行这个命令:
yum clean all
package-cleanup --problems
按照说明操作。有关进一步参考,请使用
查找文档man yum.conf
答案 1 :(得分:0)
删除了包python-argparse和redhat-upgrade-tool。
然后做了一个yum install python-devel并且这次成功了。我认为旧版python 2.6上的这两个软件包存在硬依赖性。
Sudhir Nallagangu
答案 2 :(得分:0)
问题是您使用的是CentOS 7,但安装了CentOS 6软件包。
获取所有已安装的el6软件包(rpm -qa | grep el6
)的列表并将其删除或将其更新为el7等效软件包。您应该能够删除argparse,因为它在2.7标准库中。