简体   繁体   中英

Error installing nginx with passenger-install-nginx-module on ubuntu 11.10 & rails 3.1.0

Here is the error message from installing nginx with passenger-install- nginx-module (rvmsudo). The nginx is 1.0.6 installed under /opt/nginx (default). gem install passenger successfully prior.

Someone has idea about the problem? thanks.

/usr/bin/ld: /home/dtt/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.9/
ext/nginx/../common/libpassenger_common.a(aggregate.o): undefined
reference to symbol 'round@@GLIBC_2.2.5'
/usr/bin/ld: note: 'round@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/
x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so so try adding
it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so:
could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/tmp/root-passenger-2135/nginx-1.0.6'
make: *** [build] Error 2
--------------------------------------------

It looks like something went wrong

......

Passenger downloads header files and links itself to particular libraries that the version of Ubuntu that you are trying to use doesn't have. For the best results try using an LTS distro.

From https://groups.google.com/forum/#!topic/phusion-passenger/OW-NDvlWLno

 hey! I solve this issue moving block:

 ngx_feature="Math library" ngx_feature_name= ngx_feature_run=no
 ngx_feature_incs="#include <math.h>" ngx_feature_path=
 ngx_feature_libs="-lm" ngx_feature_test="pow(1, 2)"  . auto/feature if
 [ $ngx_found = yes ]; then
     CORE_LIBS="$CORE_LIBS -lm" fi

 to after:

 ngx_addon_name=ngx_http_passenger_module HTTP_MODULES="$HTTP_MODULES
 ngx_http_passenger_module" NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
     ${ngx_addon_dir}/ngx_http_passenger_module.c \
     ${ngx_addon_dir}/Configuration.c \
     ${ngx_addon_dir}/ContentHandler.c \
     ${ngx_addon_dir}/StaticContentHandler.c" NGX_ADDON_DEPS="$NGX_ADDON_DEPS \   
     ${ngx_addon_dir}/Configuration.h \
     ${ngx_addon_dir}/ContentHandler.h \
     ${ngx_addon_dir}/StaticContentHandler.h \
     ${ngx_addon_dir}/ngx_http_passenger_module.h \
     ${ngx_addon_dir}/../common/Constants.h" CORE_LIBS="$CORE_LIBS  \
     ${ngx_addon_dir}/../common/libpassenger_common.a \
     ${ngx_addon_dir}/../common/libboost_oxt.a \
     -lstdc++ -lpthread"

 in ext/nginx/config

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM