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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值