使用 EPEL 的 AWS Linux 2 AMI 缺少 Python3.6 依赖项

使用 EPEL 的 AWS Linux 2 AMI 缺少 Python3.6 依赖项

自上周六 (2019-10-12) 以来,使用 EPEL 存储库的 Amazon Linux 2 AMI 上的依赖项似乎rlwrap已损坏。问题是rlwrap需要 Python3.6(包python36),但无法从任何来源获得。我猜想目前许多包都存在此依赖性问题。

这是 Amazon Linux 或 EPEL 开发人员的疏忽吗?还是我做错了什么?

rlwrap现在找不到依赖项,有什么方法可以安装吗?

问题重现说明

在干净的 Amazon Linux 2 服务器上,启用 EPEL 存储库并尝试安装 rlwrap(以 root 身份,或使用sudo):

amazon-linux-extras enable epel
yum clean metadata
yum install -y epel-release
yum install -y rlwrap

最后一个命令产生以下输出:

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
187 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package rlwrap.x86_64 0:0.43-2.el7 will be installed
--> Processing Dependency: /usr/bin/python3.6 for package: rlwrap-0.43-2.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: rlwrap-0.43-2.el7.x86_64
--> Processing Dependency: libtinfo.so.5()(64bit) for package: rlwrap-0.43-2.el7.x86_64
--> Running transaction check
---> Package ncurses-compat-libs.x86_64 0:6.0-8.20170212.amzn2.1.3 will be installed
--> Processing Dependency: ncurses-base = 6.0-8.20170212.amzn2.1.3 for package: ncurses-compat-libs-6.0-8.20170212.amzn2.1.3.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.amzn2.0.2 will be installed
---> Package rlwrap.x86_64 0:0.43-2.el7 will be installed
--> Processing Dependency: /usr/bin/python3.6 for package: rlwrap-0.43-2.el7.x86_64
--> Running transaction check
---> Package ncurses-base.noarch 0:6.0-8.20170212.amzn2.1.2 will be updated
--> Processing Dependency: ncurses-base = 6.0-8.20170212.amzn2.1.2 for package: ncurses-libs-6.0-8.20170212.amzn2.1.2.x86_64
---> Package ncurses-base.noarch 0:6.0-8.20170212.amzn2.1.3 will be an update
---> Package rlwrap.x86_64 0:0.43-2.el7 will be installed
--> Processing Dependency: /usr/bin/python3.6 for package: rlwrap-0.43-2.el7.x86_64
--> Running transaction check
---> Package ncurses-libs.x86_64 0:6.0-8.20170212.amzn2.1.2 will be updated
--> Processing Dependency: ncurses-libs(x86-64) = 6.0-8.20170212.amzn2.1.2 for package: ncurses-6.0-8.20170212.amzn2.1.2.x86_64
---> Package ncurses-libs.x86_64 0:6.0-8.20170212.amzn2.1.3 will be an update
---> Package rlwrap.x86_64 0:0.43-2.el7 will be installed
--> Processing Dependency: /usr/bin/python3.6 for package: rlwrap-0.43-2.el7.x86_64
--> Running transaction check
---> Package ncurses.x86_64 0:6.0-8.20170212.amzn2.1.2 will be updated
---> Package ncurses.x86_64 0:6.0-8.20170212.amzn2.1.3 will be an update
---> Package rlwrap.x86_64 0:0.43-2.el7 will be installed
--> Processing Dependency: /usr/bin/python3.6 for package: rlwrap-0.43-2.el7.x86_64
--> Processing Dependency: /usr/bin/python3.6 for package: rlwrap-0.43-2.el7.x86_64
--> Finished Dependency Resolution
Error: Package: rlwrap-0.43-2.el7.x86_64 (epel)
           Requires: /usr/bin/python3.6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

编辑:同样的问题已发布到AWS 开发人员论坛。显然,Amazon Linux 团队已经意识到了这种不兼容性,并正在努力寻找解决方案。

答案1

你必须python3amazon-extrasrepo 安装:

amazon-linux-extras install python3

有一个警告:根据amazon-linux-extras list | grep python3,当前支持的版本是3.6.2,如果 AWS 发布对3.7.xvia extras 的支持,那么上面的安装命令就会不明确。

最好使用以下内容:

amazon-linux-extras enable python3
yum clean metadata
yum install python3-3.6.* --disablerepo=amzn2-core

然后yum install -y rlwrap就成功完成了。

相关内容