![无法在 AWS 上安装 python-libs 包](https://linux22.com/image/729009/%E6%97%A0%E6%B3%95%E5%9C%A8%20AWS%20%E4%B8%8A%E5%AE%89%E8%A3%85%20python-libs%20%E5%8C%85.png)
我一直在使用 certbot 来更新我的 SSL 证书。我最近遇到了一个问题,即使使用最新版本,此脚本的执行也会失败。我收到以下错误:
---> Package python-libs.x86_64 0:2.6.6-66.el6_8 will be installed
--> Processing Dependency: libexpat.so.1(EXPAT_2_0_1_RH)(64bit) for package: python-libs-2.6.6-66.el6_8.x86_64
--> Finished Dependency Resolution
Error: Package: python-libs-2.6.6-66.el6_8.x86_64 (CentOS-base)
Requires: libexpat.so.1(EXPAT_2_0_1_RH)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
在进行一些研究时,我尝试手动安装 expats 库:
yum install expats
我也试过
yum install expats21
两者都没有在 /usr/lib64 上创建与 libexpat.so.1 匹配的文件。我尝试创建符号链接,但也没有用。
作为参考,这是我的 repolist,因为根据我在 reddit 上找到的一篇文章,这可能是原因,但是帖子中没有列出如何修复它:
Loaded plugins: priorities, replace, update-motd, upgrade-helper
Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the configuration
4847 packages excluded due to repository priority protections
repo id repo name status
CentOS-base CentOS-6 - Base 3,627+3,086
CentOS-extras CentOS-6 - Extras 31+2
CentOS-updates CentOS-6 - Updates 96+123
!amzn-main/latest amzn-main-Base 5,934
!amzn-updates/latest amzn-updates-Base 1,166
epel/x86_64 Extra Packages for Enterprise Linux 6 - x86_64 11,462+1,054
google-chrome/x86_64 google-chrome 3
nodesource/x86_64 Node.js Packages for Enterprise Linux 7 - x86_64 144
rpmforge RHEL latest - RPMforge.net - dag 4,136+582
webtatic/x86_64 Webtatic Repository EL6 - x86_64 854
yarn Yarn Repository 37
repolist: 27,490
我的问题是我需要做什么才能安装这个包?
答案1
看起来您正在尝试在 Amazon AMI 主机上安装 CentOS 软件包。您可能不想这样做。如果您想运行 CentOS 软件包,您可能应该构建一个 CentOS 主机。
另请注意,Amazon Linux 2
AMI 确实支持该python-libs
软件包。我不太确定基本Amazon Linux
AMI 是否支持。