我嘗試在新的亞馬遜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