Error updating Amazon AMI with yum

Maca asked:

I am trying to yum update the EC2 server but fails. This is first time it happened what do i need to do to resolve this?

--> 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

My answer:


You have somehow managed to install nginx and the yum repository (provided by nginx.org) you have installed along with it is not compatible with Amazon Linux. It is intended for RHEL 7 or CentOS 7. Amazon Linux is not compatible with RHEL/CentOS, and packages for these often do not work on Amazon Linux.

To resolve the problem, launch a new instance with a supported operating system distribution such as RHEL 7 or CentOS 7, and install nginx on that instance.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.