我已经通过添加新的 ppa 安装了 nginx 1.2.3
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
但是,nginx -v
仍然显示 1.1.19。发生了什么?
输出
The following packages will be upgraded:
nginx
1 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
Need to get 61.8 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/nginx/stable/ubuntu/ precise/main nginx all 1.2.3-0ubuntu0ppa3~precise [61.8 kB]
Fetched 61.8 kB in 0s (89.7 kB/s)
(Reading database ... 79914 files and directories currently installed.)
Preparing to replace nginx 1.1.19-1 (using .../nginx_1.2.3-0ubuntu0ppa3~precise_all.deb) ...
Unpacking replacement nginx ...
Setting up nginx (1.2.3-0ubuntu0ppa3~precise) ...
root@precise64:/var/www/apadment# nginx -v
nginx version: nginx/1.1.19
答案1
我不认为这会升级你所有的 nginx,如果你执行 dpkg -l | grep nginx 你可能会看到你的 nginx-full 仍然是 1.1.19
执行此操作(如果有的话,请备份数据!)
apt-get purge nginx
apt-get install nginx
现在您拥有了所有新包。