使用 yum 更新 Amazon AMI 时出错

使用 yum 更新 Amazon AMI 时出错

我尝试访问yum updateEC2 服务器但失败了。这是第一次发生这种情况,我需要做什么来解决这个问题?

--> Running transaction check
---> Package libXcomposite.x86_64 0:0.4.3-4.6.amzn1 will be installed
---> Package nginx.x86_64 1:1.10.1-1.el7.ngx will be an update
--> Processing Dependency: systemd for package: 1:nginx-1.10.1-1.el7.ngx.x86_64
--> Processing Dependency: libpcre.so.1()(64bit) for package: 1:nginx-1.10.1-1.el7.ngx.x86_64
---> Package python27-futures.noarch 0:3.0.3-1.3.amzn1 will be installed
--> Finished Dependency Resolution
--> Running transaction check
---> Package kernel.x86_64 0:4.1.13-19.30.amzn1 will be erased
---> Package nginx.x86_64 1:1.10.1-1.el7.ngx will be an update
--> Processing Dependency: systemd for package: 1:nginx-1.10.1-1.el7.ngx.x86_64
--> Processing Dependency: libpcre.so.1()(64bit) for package: 1:nginx-1.10.1-1.el7.ngx.x86_64
--> Finished Dependency Resolution
Error: Package: 1:nginx-1.10.1-1.el7.ngx.x86_64 (nginx)
           Requires: libpcre.so.1()(64bit)
Error: Package: 1:nginx-1.10.1-1.el7.ngx.x86_64 (nginx)
           Requires: systemd
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

答案1

您不知何故成功安装nginx,但随它一起安装的 yum 存储库(由 nginx.org 提供)与 Amazon Linux 不兼容。它适用于 RHEL 7 或 CentOS 7。Amazon Linux 与 RHEL/CentOS 不兼容,这些软件包通常无法在 Amazon Linux 上运行。

要解决该问题,请使用受支持的操作系统发行版(例如 RHEL 7 或 CentOS 7)启动新实例,然后在该实例上安装 nginx。

相关内容