如何更新 nginx?

如何更新 nginx?

我尝试更新 nginx,但它告诉我最新版本是 1.2.1:

root@localhost:~# aptitude install nginx
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

root@localhost:~# nginx -v
nginx version: nginx/1.2.1
root@localhost:~# aptitude update
Ign http://archive.ubuntu.com quantal Release.gpg
Ign http://archive.ubuntu.com quantal-updates Release.gpg
Ign http://security.ubuntu.com quantal-security Release.gpg
Ign http://archive.ubuntu.com quantal Release
Ign http://archive.ubuntu.com quantal-updates Release
Ign http://security.ubuntu.com quantal-security Release
Ign http://archive.ubuntu.com quantal/main amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com quantal/universe amd64 Packages/DiffIndex
Ign http://security.ubuntu.com quantal-security/main amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com quantal-updates/main amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com quantal-updates/universe amd64 Packages/DiffIndex
Ign http://security.ubuntu.com quantal-security/main Translation-en_US
Ign http://security.ubuntu.com quantal-security/main Translation-en
Err http://security.ubuntu.com quantal-security/main amd64 Packages
  404  Not Found [IP: 91.189.91.14 80]
Ign http://archive.ubuntu.com quantal/main Translation-en_US
Ign http://archive.ubuntu.com quantal/main Translation-en
Ign http://archive.ubuntu.com quantal/universe Translation-en_US
Ign http://archive.ubuntu.com quantal/universe Translation-en
Ign http://archive.ubuntu.com quantal-updates/main Translation-en_US
Ign http://archive.ubuntu.com quantal-updates/main Translation-en
Ign http://archive.ubuntu.com quantal-updates/universe Translation-en_US
Ign http://archive.ubuntu.com quantal-updates/universe Translation-en
Err http://archive.ubuntu.com quantal/main amd64 Packages
  404  Not Found [IP: 91.189.92.201 80]
Err http://archive.ubuntu.com quantal/universe amd64 Packages
  404  Not Found [IP: 91.189.92.201 80]
Err http://archive.ubuntu.com quantal-updates/main amd64 Packages
  404  Not Found [IP: 91.189.92.201 80]
Err http://archive.ubuntu.com quantal-updates/universe amd64 Packages
  404  Not Found [IP: 91.189.92.201 80]
40% [Working]W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal/main/binary-amd64/Packages: 404  Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal/universe/binary-amd64/Packages: 404  Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/main/binary-amd64/Packages: 404  Not Found [IP: 91.189.91.14 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal-updates/main/binary-amd64/Packages: 404  Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/quantal-updates/universe/binary-amd64/Packages: 404  Not Found [IP: 91.189.92.201 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache

root@localhost:~# aptitude upgrade
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

root@localhost:~# 

距离最新版本还差得远,如何更新nginx到1.6或者1.7版本?

答案1

这是发布到您所使用的存储库中的最新版本。版本被故意保留,直到经过兼容性验证。

如果您想绕过这个问题,您需要通过下载可用的二进制文件或自行编译来手动安装它。

相关内容