在rhel7上安装python36-devel失败

时间:2019-08-14 16:35:25

标签: python-3.6 yum rhel7

尝试在RHEL7上安装python36-devel,最终会收到错误消息

尝试按照错误所述解决依赖关系,但没有帮助。

也尝试过此How to install python3-devel on red hat 7,它也以相同的错误结束

yum install python36-devel

错误:

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package python36-devel.x86_64 0:3.6.8-1.el7 will be installed
--> Processing Dependency: python36 = 3.6.8-1.el7 for package: python36-devel-3.6.8-1.el7.x86_64
Package python36-3.6.8-1.el7.x86_64 is obsoleted by python3-3.6.8-10.el7.x86_64 which is already installed
--> Processing Dependency: python36-libs(x86-64) = 3.6.8-1.el7 for package: python36-devel-3.6.8-1.el7.x86_64
Package python36-libs-3.6.8-1.el7.x86_64 is obsoleted by python3-libs-3.6.8-10.el7.x86_64 which is already installed
--> Finished Dependency Resolution
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (epel)
           Requires: python36-libs(x86-64) = 3.6.8-1.el7
           Installed: python3-libs-3.6.8-10.el7.x86_64 (@rhui-REGION-rhel-server-releases)
               python36-libs(x86-64) = 3.6.8-10.el7
           Available: python36-libs-3.6.8-1.el7.x86_64 (epel)
               python36-libs(x86-64) = 3.6.8-1.el7
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (epel)
           Requires: python36 = 3.6.8-1.el7
           Installed: python3-3.6.8-10.el7.x86_64 (@rhui-REGION-rhel-server-releases)
               python36 = 3.6.8-10.el7
           Available: python36-3.6.8-1.el7.x86_64 (epel)
               python36 = 3.6.8-1.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

3 个答案:

答案 0 :(得分:2)

yum不喜欢降级软件包,除非您明确告诉他这样做。

python36-devel要求python36-libs具有完全相同的版本号。但是,您python36-libs安装了更高版本号。您有两种选择:

  1. 找出为什么yum只能找到旧版本的python36-devel,从逻辑上讲,您应该能够在安装python36-devel-3.6.8-10的同一存储库中找到python36-libs, @ rhui-REGION-rhel-server-releases。
  2. python36-libs降级为与您要安装的python36-devel相同的版本。

要降级并安装python36-devel

yum downgrade python36-libs-3.6.8-1.el7.x86_64
yum install python36-devel

或什至只执行一项操作:

yum swap -- downgrade python36-libs-3.6.8-1.el7.x86_64 -- install python36-devel

答案 1 :(得分:2)

截至2019年8月23日,我发现以下解决方法可处理ol7_developer_EPEL存储库中的python36-3.6.8-1,落后于ol7_latest中的python36-3.6.8-10。

FileOpenPicker

答案 2 :(得分:0)

显然,仓库 @ rhui-REGION-rhel-server-releases 具有python3-libs-3.6.8-10.el7.x86_64,但没有较低版本的 python36-libs- 3.6.8-1.el7.x86_64

Chris Maes指出,python36-devel和python36-libs应该具有完全相同的版本。

epel 存储库具有相同版本的两个库,但是由于与 @ rhui-REGION-rhel-server-releases 冲突,安装已升级。 / p>

因此,禁用仓库 @ rhui-REGION-rhel-server-releases ,并对两个库使用 epel

sudo yum-config-manager --disable rhui-REGION-rhel-server-releases
sudo yum-config-manager --disable @rhui-REGION-rhel-server-releases
sudo yum install python36-setuptools -y 
sudo yum install python36-devel -y 
# enable later
sudo yum-config-manager --enable rhui-REGION-rhel-server-releases
sudo yum-config-manager --enable @rhui-REGION-rhel-server-releases

解决方案功劳:user3788685