V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
ColinZeb
V2EX  ›  NGINX

为什么我配置了 nginx 官方包源,还是无法更新 nginx 到 1.10.3 呢

  •  
  •   ColinZeb ·
    ColinZeb · 2017-02-22 14:40:06 +08:00 · 4279 次点击
    这是一个创建于 2849 天前的主题,其中的信息可能已经有所发展或是发生改变。
    是源优先级的问题吗,如何调整?
    这是我 apt show nginx -a 命令的结果
    Package: nginx
    Version: 1:1.10.2-8.5.1.2~xenial1
    Priority: optional
    Section: httpd
    Maintainer: Phusion <[email protected]>;
    Installed-Size: 37.9 kB
    Depends: nginx-extras (>= 1:1.10.2-8.5.1.2~xenial1), nginx-extras (<< 1:1.10.2-8.5.1.2~xenial1.1~)
    Homepage: http://nginx.net
    Download-Size: 25.8 kB
    APT-Manual-Installed: yes
    APT-Sources: https://oss-binaries.phusionpassenger.com/apt/passenger xenial/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install nginx-extras.

    Package: nginx
    Version: 1:1.10.2-8.5.1.1~xenial1
    Priority: optional
    Section: httpd
    Maintainer: Phusion <[email protected]>;
    Installed-Size: 37.9 kB
    Depends: nginx-extras (>= 1:1.10.2-8.5.1.1~xenial1), nginx-extras (<< 1:1.10.2-8.5.1.1~xenial1.1~)
    Homepage: http://nginx.net
    Download-Size: 25.7 kB
    APT-Sources: https://oss-binaries.phusionpassenger.com/apt/passenger xenial/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install nginx-extras.

    Package: nginx
    Version: 1:1.10.2-8.5.1.0~xenial1
    Priority: optional
    Section: httpd
    Maintainer: Phusion <[email protected]>;
    Installed-Size: 37.9 kB
    Depends: nginx-extras (>= 1:1.10.2-8.5.1.0~xenial1), nginx-extras (<< 1:1.10.2-8.5.1.0~xenial1.1~)
    Homepage: http://nginx.net
    Download-Size: 25.7 kB
    APT-Sources: https://oss-binaries.phusionpassenger.com/apt/passenger xenial/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install nginx-extras.

    Package: nginx
    Version: 1:1.10.1-8.5.0.30~xenial1
    Priority: optional
    Section: httpd
    Maintainer: Phusion <[email protected]>;
    Installed-Size: 36.9 kB
    Depends: nginx-extras (>= 1:1.10.1-8.5.0.30~xenial1), nginx-extras (<< 1:1.10.1-8.5.0.30~xenial1.1~)
    Homepage: http://nginx.net
    Download-Size: 24.9 kB
    APT-Sources: https://oss-binaries.phusionpassenger.com/apt/passenger xenial/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install nginx-extras.

    Package: nginx
    Version: 1:1.10.1-8.5.0.29~xenial1
    Priority: optional
    Section: httpd
    Maintainer: Phusion <[email protected]>;
    Installed-Size: 36.9 kB
    Depends: nginx-extras (>= 1:1.10.1-8.5.0.29~xenial1), nginx-extras (<< 1:1.10.1-8.5.0.29~xenial1.1~)
    Homepage: http://nginx.net
    Download-Size: 24.9 kB
    APT-Sources: https://oss-binaries.phusionpassenger.com/apt/passenger xenial/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install nginx-extras.

    Package: nginx
    Version: 1.10.3-1~xenial
    Priority: optional
    Section: httpd
    Maintainer: Sergey Budnevitch <[email protected]>;
    Installed-Size: 2,606 kB
    Provides: httpd
    Depends: libc6 (>= 2.14), libpcre3, libssl1.0.0 (>= 1.0.2~beta3), zlib1g (>= 1:1.1.4), lsb-base, adduser
    Homepage: http://nginx.org
    Download-Size: 743 kB
    APT-Sources: http://nginx.org/packages/ubuntu xenial/nginx amd64 Packages
    Description: high performance web server
    nginx [engine x] is an HTTP and reverse proxy server, as well as
    a mail proxy server.

    Package: nginx
    Version: 1.10.2-1~xenial
    Priority: optional
    Section: httpd
    Maintainer: Sergey Budnevitch <[email protected]>;
    Installed-Size: 2,432 kB
    Provides: httpd
    Depends: libc6 (>= 2.14), libpcre3, libssl1.0.0 (>= 1.0.2~beta3), zlib1g (>= 1:1.1.4), lsb-base, adduser
    Homepage: http://nginx.org
    Download-Size: 715 kB
    APT-Sources: http://nginx.org/packages/ubuntu xenial/nginx amd64 Packages
    Description: high performance web server
    nginx [engine x] is an HTTP and reverse proxy server, as well as
    a mail proxy server.

    Package: nginx
    Version: 1.10.1-1~xenial
    Priority: optional
    Section: httpd
    Maintainer: Sergey Budnevitch <[email protected]>;
    Installed-Size: 2,360 kB
    Provides: httpd
    Depends: libc6 (>= 2.14), libpcre3, libssl1.0.0 (>= 1.0.2~beta3), zlib1g (>= 1:1.1.4), lsb-base, adduser
    Homepage: http://nginx.org
    Download-Size: 652 kB
    APT-Sources: http://nginx.org/packages/ubuntu xenial/nginx amd64 Packages
    Description: high performance web server
    nginx [engine x] is an HTTP and reverse proxy server, as well as
    a mail proxy server.

    Package: nginx
    Version: 1.10.0-1~xenial
    Priority: optional
    Section: httpd
    Maintainer: Sergey Budnevitch <[email protected]>;
    Installed-Size: 2,360 kB
    Provides: httpd
    Depends: libc6 (>= 2.14), libpcre3, libssl1.0.0 (>= 1.0.2~beta3), zlib1g (>= 1:1.1.4), lsb-base, adduser
    Homepage: http://nginx.org
    Download-Size: 651 kB
    APT-Sources: http://nginx.org/packages/ubuntu xenial/nginx amd64 Packages
    Description: high performance web server
    nginx [engine x] is an HTTP and reverse proxy server, as well as
    a mail proxy server.

    Package: nginx
    Version: 1.10.0-0ubuntu0.16.04.4
    Priority: optional
    Section: web
    Origin: Ubuntu
    Maintainer: Ubuntu Developers <[email protected]>;
    Original-Maintainer: Kartik Mistry <[email protected]>;
    Bugs: https://bugs.launchpad.net/ubuntu/+filebug
    Installed-Size: 37.9 kB
    Depends: nginx-core (>= 1.10.0-0ubuntu0.16.04.4) | nginx-full (>= 1.10.0-0ubuntu0.16.04.4) | nginx-light (>= 1.10.0-0ubuntu0.16.04.4) | nginx-extras (>= 1.10.0-0ubuntu0.16.04.4), nginx-core (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-full (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-light (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-extras (<< 1.10.0-0ubuntu0.16.04.4.1~)
    Homepage: http://nginx.net
    Supported: 5y
    Download-Size: 3,498 B
    APT-Sources: https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install either nginx-core (by default),
    nginx-full, nginx-light, or nginx-extras.

    Package: nginx
    Version: 1.9.15-0ubuntu1
    Priority: optional
    Section: web
    Origin: Ubuntu
    Maintainer: Ubuntu Developers <[email protected]>;
    Original-Maintainer: Kartik Mistry <[email protected]>;
    Bugs: https://bugs.launchpad.net/ubuntu/+filebug
    Installed-Size: 36.9 kB
    Depends: nginx-core (>= 1.9.15-0ubuntu1) | nginx-full (>= 1.9.15-0ubuntu1) | nginx-light (>= 1.9.15-0ubuntu1) | nginx-extras (>= 1.9.15-0ubuntu1), nginx-core (<< 1.9.15-0ubuntu1.1~) | nginx-full (<< 1.9.15-0ubuntu1.1~) | nginx-light (<< 1.9.15-0ubuntu1.1~) | nginx-extras (<< 1.9.15-0ubuntu1.1~)
    Homepage: http://nginx.net
    Supported: 5y
    Download-Size: 3,490 B
    APT-Sources: https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial/main amd64 Packages
    Description: small, powerful, scalable web/proxy server
    Nginx ("engine X") is a high-performance web and reverse proxy server
    created by Igor Sysoev. It can be used both as a standalone web server
    and as a proxy to reduce the load on back-end HTTP or mail servers.
    .
    This is a dependency package to install either nginx-core (by default),
    nginx-full, nginx-light, or nginx-extras.
    第 1 条附言  ·  2017-02-24 10:33:21 +08:00
    解决了,是 passenger 的问题,这是安装了 passenger 的包所以不升级。
    我看 passenger 官方的说法是, nginx 不支持动态添加模块,只能编译安装,还说这是 nginx 的设计故意为之,不只是真是假。
    https://github.com/phusion/passenger/wiki/Why-can't-Phusion-Passenger-extend-my-existing-Nginx%3F
    18 条回复    2017-02-26 12:06:17 +08:00
    daya
        1
    daya  
       2017-02-22 16:00:22 +08:00
    编译安装咯, Nginx 编译起来很简单的
    ColinZeb
        2
    ColinZeb  
    OP
       2017-02-22 16:13:44 +08:00
    @daya 编译不方便升级
    acrisliu
        3
    acrisliu  
       2017-02-22 16:14:28 +08:00 via Android
    你添加的是 mainline 还是 stable
    RobertYang
        4
    RobertYang  
       2017-02-22 19:57:10 +08:00 via Android
    @ColinZeb 一直都是编译安装加奇葩模块。。你又不是没事都在升级 (虽然我是
    wenzhoou
        5
    wenzhoou  
       2017-02-22 20:03:19 +08:00
    我也在发愁这个问题。
    现在的版本太低,想编译,编译选项想和以前一样,但是

    pi@raspberrypi:~ $ nginx -V
    nginx version: nginx/1.6.2
    TLS SNI support enabled
    configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/build/nginx-9ZP8XW/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/build/nginx-9ZP8XW/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-9ZP8XW/nginx-1.6.2/debian/modules/nginx-echo --add-module=/build/nginx-9ZP8XW/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/build/nginx-9ZP8XW/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module

    --add-module= ??? 这一片一看我就晕了。
    没这个玩意儿啊。怎么编译。
    ColinZeb
        6
    ColinZeb  
    OP
       2017-02-22 21:33:52 +08:00
    @acrisliu stable,我列出的有最新版本但不给我升级,不知道为什么
    ColinZeb
        7
    ColinZeb  
    OP
       2017-02-22 21:35:01 +08:00
    @wenzhoou 你这个也太旧了, ubuntu 应该不会这么旧吧,如果其他系统的话找个更辛苦的源直接升级就好了
    ColinZeb
        8
    ColinZeb  
    OP
       2017-02-22 21:36:16 +08:00
    @RobertYang 我也是没事升级啊,编译安装感觉没有包管理方便,我是新手,哈哈
    akira
        9
    akira  
       2017-02-22 21:38:40 +08:00
    原来的版本如果太老的话 ,那还不如直接 remove 掉重新安装
    daviswei
        10
    daviswei  
       2017-02-22 22:33:15 +08:00 via Android
    @ColinZeb 编译到新目录,然后通过软连接来切换版本,太方便了啊
    ColinZeb
        11
    ColinZeb  
    OP
       2017-02-22 23:33:21 +08:00
    @daviswei 那是切换版本,更新则需要 pull 代码然后编译。而包方便多了,直接 yum update 或者 apt upgrade
    kn007
        12
    kn007  
       2017-02-22 23:42:38 +08:00
    还是编译安装最方便。。
    est
        13
    est  
       2017-02-23 00:05:43 +08:00
    apt-get update 没有。。。

    要添加 mainline 的才行。

    或者你直接去下载 .deb 然后 dpkg -i 得了。
    Sunnyyoung
        14
    Sunnyyoung  
       2017-02-23 00:06:10 +08:00 via iPhone
    Docker 随便切
    MikuM97
        15
    MikuM97  
       2017-02-23 00:51:58 +08:00
    我都是自己编译,指定新版的 openssl ,不然不支持 ALPN 连 http2 都打不开。其实编译参数固定了写个脚本很快就搞定了。
    ColinZeb
        16
    ColinZeb  
    OP
       2017-02-23 10:29:52 +08:00
    @est 有的, 我要的是 1.10.3 不是 1.11.x ,我 po 中也列出来了 1.10.3 ,但问题是不提示更新
    --
    Package: nginx
    Version: 1.10.3-1~xenial
    Priority: optional
    Section: httpd
    Maintainer: Sergey Budnevitch <[email protected]>;
    Installed-Size: 2,606 kB
    Provides: httpd
    Depends: libc6 (>= 2.14), libpcre3, libssl1.0.0 (>= 1.0.2~beta3), zlib1g (>= 1:1.1.4), lsb-base, adduser
    Homepage: http://nginx.org
    Download-Size: 743 kB
    APT-Sources: http://nginx.org/packages/ubuntu xenial/nginx amd64 Packages
    Description: high performance web server
    nginx [engine x] is an HTTP and reverse proxy server, as well as
    a mail proxy server.
    wenzhoou
        17
    wenzhoou  
       2017-02-23 18:38:58 +08:00
    @ColinZeb 树莓派的最新系统就是这个了。唉。 ARMv8 的 cpu
    daya
        18
    daya  
       2017-02-26 12:06:17 +08:00 via Android   ❤️ 1
    @ColinZeb 编译升级也相当方便的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2998 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:58 · PVG 18:58 · LAX 02:58 · JFK 05:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.