nginx的安装乘客模块失败

时间:2017-12-20 17:13:25

标签: ruby-on-rails ruby nginx debian passenger

我想添加Passenger支持我的debian9 / nginx服务器。

我已经通过apt。

安装了ruby和rails

apt-get install -y libnginx-mod-http-passenger导致此错误消息:

 *The following packages have unmet dependencies:
     libnginx-mod-http-passenger : Depends: nginx-common (= 1.10.3-1+deb9u1) but 1.12.2-1~dotdeb+8.1 is to be installed
    E: Unable to correct problems, you have held broken packages.*

my config: 
    uname -r ==> 4.9.0-4-amd64
    cat /etc/debian_version ==> 9.3

nginx -V ==> 
    nginx version: nginx/1.12.2
    built with OpenSSL 1.0.1t  3 May 2016
    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 -Wl,-z,now' --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 --modules-path=/usr/lib/nginx/modules --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-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-file-aio --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_realip_module --with-stream_geoip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail=dynamic --with-mail_ssl_module --add-dynamic-module=/usr/src/builddir/debian/modules/nginx-auth-pam --add-module=/usr/src/builddir/debian/modules/nginx-dav-ext-module --add-module=/usr/src/builddir/debian/modules/nginx-echo --add-module=/usr/src/builddir/debian/modules/nginx-upstream-fair --add-module=/usr/src/builddir/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/builddir/debian/modules/nginx-cache-purge


ruby -v ==> ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
rails -v ==> Rails 4.2.7.1

到目前为止,我已遵循官方教程here

2 个答案:

答案 0 :(得分:0)

您是否尝试过运行此命令

  

apt-get install -y libnginx-mod-http-passenger

用sudo?

也尝试运行

  

sudo apt-get autoclean

将删除无法下载的包

然后是下面的命令,它将使用-f标志

  

sudo apt-get install -fy libnginx-mod-http-passenger

答案 1 :(得分:0)

旧问题,但答案可能使某人感兴趣;)

据我了解libnginx-mod-http-passenger,它会强制使用nginx的版本(此处 = 1.10.3-1 + deb9u1 ),但是您拥有< (已编译或使用 backports )strong> 1.12.2 。

然后,您需要将nginx降级(例如,使用 stable rep),以便能够使用预编译的模块。另外,您可以put passenger behind a nginx reverse proxy