steve
steve

Reputation: 21

installation passenger module for nginx failed

I want to add Passenger support do my debian9/nginx server.

I've installed ruby and rails via apt.

apt-get install -y libnginx-mod-http-passenger leads to this error msg:

 *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

So far I have followed the official tutorial, here.

Upvotes: 2

Views: 777

Answers (2)

Alex
Alex

Reputation: 113

Old question but answer may interest someone ;)

As far as I understand libnginx-mod-http-passenger, it forces the version of nginx to use (here = 1.10.3-1+deb9u1), but you have the 1.12.2 installed (either compiled or using backports).

You then need to donwgrade nginx (using stable rep for exemple) in order to be able to use the precompiled module. Else you can put passenger behind a nginx reverse proxy.

Upvotes: 1

RoRFan
RoRFan

Reputation: 424

Did you try to run this command

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

with sudo ?

Also try to run

sudo apt-get autoclean

which will remove packages that can't be downloaded

and afterwards the below command which will use the -f flag

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

Upvotes: 0

Related Questions