如何修复这个 yum 依赖要求并安装 python?

如何修复这个 yum 依赖要求并安装 python?
bash-4.2# yum install openscap-containers
Resolving Dependencies
--> Running transaction check
---> Package openscap-containers.noarch 0:1.3.3-1.el7 will be installed
--> Processing Dependency: python(abi) = 3.6 for package: openscap-containers-1.3.3-1.el7.noarch
--> Processing Dependency: /usr/bin/python3 for package: openscap-containers-1.3.3-1.el7.noarch
--> Processing Dependency: /usr/bin/python3 for package: openscap-containers-1.3.3-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: openscap-containers-1.3.3-1.el7.noarch (copr:copr.fedorainfracloud.org:openscapmaint:openscap-latest)
           Requires: python(abi) = 3.6
           Installed: python-2.7.5-88.el7.x86_64 (installed)
               python(abi) = 2.7
               python(abi) = 2.7
           Installed: python34-3.4.10-4.el7.x86_64 (@epel)
               python(abi) = 3.4
Error: Package: openscap-containers-1.3.3-1.el7.noarch (copr:copr.fedorainfracloud.org:openscapmaint:openscap-latest)
           Requires: /usr/bin/python3
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

即使我安装了 python3 并且能够使用它,/usr/bin/python3它也说我不满足要求。

bash-4.2# yum install rh-python36
bash-4.2# ln -s /opt/rh/rh-python36/root/usr/bin/python /usr/bin/python3

答案1

功能python(abi) = 3.6和文件由基础存储库中的包/usr/bin/python3提供(python3参考)。

您应该yum install openscap-containers在启用基础存储库时运行。

由于yum没有将其作为依赖项,因此您会遇到基础存储库被禁用或缺少其存储库定义的问题。

在后一种情况下,yum reinstall centos-release

相关内容