从源代码构建nginx +乘客安装失败

时间:2012-07-06 16:36:13

标签: nginx passenger ubuntu-10.04 ld

OpSys:Ubuntu 10.04 LTS

乘客:乘客-3.0.13

Nginx:nginx-1.2.1

尝试使用许多配置从源nginx +乘客安装,除了“默认”之外没有任何工作。

这有效:

 --prefix=/opt/host/nginx --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt=-Wno-error --add-module=/usr/local/src/passenger-3.0.13/ext/nginx

此操作失败:

 --prefix=/opt/host/nginx --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt=-Wno-error --add-module=/usr/local/src/passenger-3.0.13/ext/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log

-------------错误输出--------------

    objs/ngx_modules.o \
    -lpthread -lcrypt /usr/local/src/passenger-3.0.13/ext/nginx/../common/libpassenger_common.a /usr/local/src/passenger-3.0.13/ext/nginx/../common/libboost_oxt.a -lstdc++ -lpthread -lm /usr/local/src/passenger-3.0.13/ext/nginx/../common/libpassenger_common.a /usr/local/src/passenger-3.0.13/ext/nginx/../common/libboost_oxt.a -lstdc++ -lpthread -lm -lpcre -lssl -lcrypto -ldl -lz -lGeoIP \
    -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
    objs/addon/nginx/ngx_http_passenger_module.o: In function `shutdown_helper_server':
    /usr/local/src/passenger-3.0.13/ext/nginx/ngx_http_passenger_module.c:385: multiple definition of `passenger_agents_starter'
    objs/addon/nginx/ngx_http_passenger_module.o:/usr/local/src/passenger-3.0.13/ext/nginx/ngx_http_passenger_module.c:385: first defined here
    objs/addon/nginx/ngx_http_passenger_module.o: In function `ngx_str_null_terminate':
    /usr/local/src/passenger-3.0.13/ext/nginx/ngx_http_passenger_module.c:100: multiple definition of `ngx_str_null_terminate'
    objs/addon/nginx/ngx_http_passenger_module.o:/usr/local/src/passenger-3.0.13/ext/nginx/ngx_http_passenger_module.c:100: first defined here
    objs/addon/nginx/ngx_http_passenger_module.o:(.data+0x0): multiple definition of `ngx_http_passenger_module'
    objs/addon/nginx/ngx_http_passenger_module.o:(.data+0x0): first defined here
    objs/addon/nginx/Configuration.o: In function `union_station_filter':
    /usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:955: multiple definition of `union_station_filter'
    objs/addon/nginx/Configuration.o:/usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:955: first defined here
    objs/addon/nginx/Configuration.o: In function `passenger_create_loc_conf':
    /usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:263: multiple definition of `passenger_create_loc_conf'
    objs/addon/nginx/Configuration.o:/usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:263: first defined here
    objs/addon/nginx/Configuration.o: In function `passenger_create_main_conf':
    /usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:67: multiple definition of `passenger_create_main_conf'
    objs/addon/nginx/Configuration.o:/usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:67: first defined here
    objs/addon/nginx/Configuration.o: In function `passenger_init_main_conf':
    /usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:115: multiple definition of `passenger_init_main_conf'
    objs/addon/nginx/Configuration.o:/usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:115: first defined here
    objs/addon/nginx/Configuration.o: In function `passenger_merge_loc_conf':
    /usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:382: multiple definition of `passenger_merge_loc_conf'
    objs/addon/nginx/Configuration.o:/usr/local/src/passenger-3.0.13/ext/nginx/Configuration.c:382: first defined here
    objs/addon/nginx/Configuration.o:(.rodata+0x0): multiple definition of `passenger_commands'
    objs/addon/nginx/Configuration.o:(.rodata+0x0): first defined here
    objs/addon/nginx/ContentHandler.o: In function `passenger_content_handler':
    /usr/local/src/passenger-3.0.13/ext/nginx/ContentHandler.c:1341: multiple definition of `passenger_content_handler'
    objs/addon/nginx/ContentHandler.o:/usr/local/src/passenger-3.0.13/ext/nginx/ContentHandler.c:1341: first defined here
    objs/addon/nginx/StaticContentHandler.o: In function `passenger_static_content_handler':
    /usr/local/src/passenger-3.0.13/ext/nginx/StaticContentHandler.c:51: multiple definition of `passenger_static_content_handler'
    objs/addon/nginx/StaticContentHandler.o:/usr/local/src/passenger-3.0.13/ext/nginx/StaticContentHandler.c:51: first defined here
    collect2: ld returned 1 exit status
    make[1]: *** [objs/nginx] Error 1
    make[1]: Leaving directory `/usr/local/src/nginx-1.2.1'
    make: *** [build] Error 2

--------------------------------------------

1 个答案:

答案 0 :(得分:0)

虽然它可能没有完全帮助,但我能够通过使用nginx-1.0.14来避免编译错误 - 但是,当启动nginx时,我确实遇到了分段错误..我确实让它工作了完美地与nginx-1.2.2