【发布时间】:2016-09-02 02:51:18
【问题描述】:
我尝试在全新的 amazon linux 上安装最新版本的 nginx (>= 1.9.5) 以使用 http2。我按照此处描述的说明进行操作-> http://nginx.org/en/linux_packages.html
我创建了一个回购文件/etc/yum.repos.d/nginx.repo,内容如下:
[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
【问题讨论】:
标签: amazon-web-services nginx amazon-ec2 yum amazon-ami