`
ssxxjjii
  • 浏览: 931980 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

安装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/feature


if [ $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/feature
fi


if [ $ngx_found = yes ]; then
    CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

else

cat << END

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

END

    exit 1
fi

 

分享到:
评论
2 楼 ssxxjjii 2011-11-04  
lidou 写道
./configure --with-ld-opt='-Wl,-R,/opt/googleperftools/lib -L/opt/googleperftools/lib,-lprofiler'

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

相关推荐

Global site tag (gtag.js) - Google Analytics