读书人

安装googlepreftools与nginx有关问题

发布时间: 2012-08-07 14:54:47 作者: rapoo

安装googlepreftools与nginx问题

prefix指定路径方式安装googlepreftools后再次安装nginx 时启用googlepreftools功能时候报找不到googlepreftools lib包。。

异常:

./configure: error: the Google perftool module requires the Google perftools
library. You can either do not enable the module or install the library.

问题原因是:nginx在使用googlepreftools插件时候conf中默认使用了usr/local安装路径。没有采用变量形式。故我们自定义安装路径的googlepreftools。nginx在安装时候会找不到其位置。解决办法要么googlepreftools默认安装 。要么修改 nginx tar包中的这个文件
nginx/auto/lib/google-perftools/conf,把其中的“/usr/local" 全部替换成你的google-perftools的路径,比如:/opt/google-perftools

再次安装 nginx成功 !

./configure --user=shi_nginx --group=shi_nginx --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-google_perftools_module --prefix=/opt/nginx-1.0.8

?

make?

make install

make clean

?

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

我修改后的conf文件【/root/nginx-1.0.8/auto/lib/google-perftools、conf】

?

# Copyright (C) Igor Sysoev    ngx_feature="Google perftools"    ngx_feature_name=    ngx_feature_run=no    ngx_feature_incs=    ngx_feature_path=    ngx_feature_libs="-lprofiler"    ngx_feature_test="ProfilerStop()"    . auto/featureif [ $ngx_found = no ]; then    # FreeBSD port    ngx_feature="Google perftools in /opt/googleperftools/"    if [ $NGX_RPATH = YES ]; then        ngx_feature_libs="-R/opt/googleperftools/lib -L/opt/googleperftools/lib -lprofiler"    else        ngx_feature_libs="-L/opt/googleperftools/lib -lprofiler"    fi    . auto/featurefiif [ $ngx_found = yes ]; then    CORE_LIBS="$CORE_LIBS $ngx_feature_libs"elsecat << END$0: error: the Google perftool module requires the Google perftoolslibrary. You can either do not enable the module or install the library.END    exit 1fi

?

1 楼 lidou 2011-11-04 ./configure --with-ld-opt='-Wl,-R,/opt/googleperftools/lib -L/opt/googleperftools/lib,-lprofiler' 2 楼 ssxxjjii 2011-11-04 lidou 写道./configure --with-ld-opt='-Wl,-R,/opt/googleperftools/lib -L/opt/googleperftools/lib,-lprofiler'
这种方式也能成功? 我暂时还没尝试过

读书人网 >开源软件

热点推荐