nginx 1.2.3安装,但仍然在1.1.19

我已经通过添加一个新的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 

我不认为会升级你所有的nginx,如果你做了dpkg -l | grep nginx你可能会看到你的nginx-full仍然是1.1.19

这样做(在备份数据后,如果有的话)!

 apt-get purge nginx apt-get install nginx 

现在你有所有新的包。