1

I'd like to run nginx as a reverse proxy with apache2 on my EC2 micro instance. yum install nginx gives me nginx-0.8.53-1.2.amzn1.x86_64.rpm The current nginx is 1.0.4

I found and followed this guide: http://kdn2.info/2011/05/install-nginx-on-amazon-ec2/ It works fine up to and including "make".

When I get to checkinstall --fstrans=no I get

ERROR: ld.so: object '/usr/lib/installwatch.so' from LD_PRELOAD cannot be preloaded: ignored.
test -d '/var/log/nginx' ||             mkdir -p '/var/log/nginx'
ERROR: ld.so: object '/usr/lib/installwatch.so' from LD_PRELOAD cannot be preloaded: ignored.
make[1]: Leaving directory `/root/src/nginx-1.0.4'

======================== Installation successful ==========================
Copying documentation directory...
./
./CHANGES
./LICENSE
./README
cp: cannot stat `//var/tmp/gRWoVgIcdbmjfTjoVGBM/newfiles.tmp': No such file or directory

Copying files to the temporary directory...OK
Striping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building RPM package... FAILED!
*** Failed to build the package

...and the logfile is full of:

Building target platforms: x86_64
Building for target x86_64
Processing files: nginx-1.0.4-1.x86_64
error: File not found: /usr/src/rpm/BUILDROOT/nginx-1.0.4-1.x86_64/usr
error: File not found: /usr/src/rpm/BUILDROOT/nginx-1.0.4-1.x86_64/usr/doc

There IS /usr/src/rpm/BUILDROOT/nginx-1.0.4-1.x86_64/ but no /usr

Following further down the page, it says:

"If we want to use, for example, PHP 5.2 we can download PHP and Nginx compatible with Amazon Kernel(Xen Kernel) from the CentosALT Repository."

So I install the two repositories, but when I

yum install http://centos.alt.ru/pub/nginx/1.0/RPMS/x86_64/nginx-stable-1.0.4-1.el5.x86_64.rpm

I get

Error: Package: nginx-stable-1.0.4-1.el5.x86_64 (/nginx-stable-1.0.4-1.el5.x86_64)
           Requires: perl(:MODULE_COMPAT_5.8.8)  You could try using --skip-broken to work around the problem

but that doesn't fix it.

When I do yum update, I get

--> Finished Dependency Resolution
Error: Package: python-distribute-0.6.19-10.1.x86_64 (devel_languages_python)
           Requires: python < 2.5
           Installed: 1:python-2.6-1.19.amzn1.noarch (@amzn-main)
               python = 1:2.6-1.19.amzn1
Error: Package: python-distribute-0.6.19-10.1.i586 (devel_languages_python)
           Requires: python < 2.5
           Installed: 1:python-2.6-1.19.amzn1.noarch (@amzn-main)
               python = 1:2.6-1.19.amzn1

I've tried everything - yum clean all and various other suggestions found on other sites.

If anyone has any suggestions or a known package of the current 1.04 nginx working on EC2 Micro (Linux ip-10-56-63-85 2.6.35.11-83.9.amzn1.x86_64 #1 SMP Sat Feb 19 23:42:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux - which I think is RHEL 5?) then I'd be grateful.

Incidentally, does this repolist look right?

repo id                                 repo name                                                                          status
CentALT                                 CentALT Packages for Enterprise Linux 5 - x86_64                                   enabled:   112+157
amzn-main                               amzn-main-Base                                                                     enabled:     2,706
amzn-main-debuginfo                     amzn-main-debuginfo                                                                disabled
amzn-main-nosrc                         amzn-main-nosrc                                                                    disabled
amzn-updates                            amzn-updates-Base                                                                  enabled:       328
amzn-updates-debuginfo                  amzn-updates-debuginfo                                                             disabled
amzn-updates-nosrc                      amzn-updates-nosrc                                                                 disabled
devel_languages_python                  Python and Python Modules (SLE_10)                                                 enabled: 1,452+768
epel                                    Extra Packages for Enterprise Linux 5 - x86_64                                     enabled: 5,892+604
epel-debuginfo                          Extra Packages for Enterprise Linux 5 - x86_64 - Debug                             disabled
epel-source                             Extra Packages for Enterprise Linux 5 - x86_64 - Source                            disabled
epel-testing                            Extra Packages for Enterprise Linux 5 - Testing - x86_64                           disabled
epel-testing-debuginfo                  Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Debug                   disabled
epel-testing-source                     Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Source                  disabled
s3tools                                 Tools for managing Amazon S3 - Simple Storage Service (RHEL_6)                     enabled:       2+1
repolist: 10,492

2 Answers 2

1

As a side note, nginx packages are available now in RPM format, so subsequent people shouldn't necessarily go through the OP's problems with building the software.

http://nginx.org/en/download.html

I don't know how Amazon Linux gets tagged in terms of yum setup, but RHEL5/6 are up there.

In the worst case, someone can grab the appropriate SRPM and rebuild from there.

http://nginx.org/packages/rhel/5/SRPMS/

0

I encountered the same problem on CentOS 6

I think you can get over it by disabling epel and CentALT repositories or by adding this option to yum : yum install nginx --disablerepo=epel,CentALT

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .