在Amazon EC2 micro-perl和python问题上构buildnginx 1.0.4

我想在我的EC2微型实例上运行nginx作为apache2的反向代理。 yum install nginx给了我nginx-0.8.53-1.2.amzn1.x86_64.rpm目前的nginx是1.0.4

我发现并遵循了这个指南: http : //kdn2.info/2011/05/install-nginx-on-amazon-ec2/它工作正常,并包括“make”。

当我去checkinstall –fstrans =没有我得到

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 

…和日志文件充满:

 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 

有/usr/src/rpm/BUILDROOT/nginx-1.0.4-1.x86_64/但没有/ usr

接下来的页面,它说:

“如果我们想要使用PHP 5.2,我们可以从CentosALT Repository下载与Amazon Kernel(Xen Kernel)兼容的PHP和Nginx。

所以我安装了这两个仓库,但是当我

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

我明白了

 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 

但是这不能解决它。

当我做yum更新,我得到

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

我已经尝试了一切 – 百胜集团清理所有其他网站上的其他build议。

如果任何人有任何build议或目前已知的EC2 Micro上的1.04 nginx包(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 – 我认为是RHEL 5?)那么我将不胜感激。

顺便说一句,这个repolist看起来是对的吗?

 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 

顺便提一下,nginx包现在已经可以用RPM格式了,所以后面的人不一定要通过构build软件来解决OP的问题。

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

我不知道亚马逊Linux是如何通过yum设置标记的,但是RHEL5 / 6在那里。

在最糟糕的情况下,有人可以抓住合适的SRPM并从那里重build。

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

我在CentOS 6上遇到同样的问题

我认为你可以通过禁用epelCentALT仓库或者将这个选项添加到yum来解决它: yum install nginx --disablerepo=epel,CentALT