我尝试在新的亚马逊linux上安装最新版本的Nginx(> = 1.9.5)来使用http2.我按照这里描述的说明 – > http://nginx.org/en/linux_packages.html
我创建了一个repo文件/etc/yum.repos.d/Nginx.repowith这个内容:
[Nginx]
name=Nginx repo
baseurl=http://Nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1
如果我运行yum update和yum install Nginx,我会得到:
Nginx x86_64 1:1.8.1-1.26.amzn1 amzn-main 557 k
看起来它仍然来自amzn-main回购.如何安装较新版本的Nginx?
– 编辑 –
我在Nginx.repo文件中添加了“priority = 10”,现在我可以使用yum install Nginx安装1.9.15,结果如下:
Loaded plugins: priorities,update-motd,upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package Nginx.x86_64 1:1.9.15-1.el7.ngx will be installed
--> Processing Dependency: systemd for package: 1:Nginx-1.9.15-1.el7.ngx.x86_64
--> Processing Dependency: libpcre.so.1()(64bit) for package: 1:Nginx-1.9.15-1.el7.ngx.x86_64
--> Finished Dependency Resolution
Error: Package: 1:Nginx-1.9.15-1.el7.ngx.x86_64 (Nginx)
Requires: libpcre.so.1()(64bit)
Error: Package: 1:Nginx-1.9.15-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
最佳答案