美文网首页
mac os 下openresty源码安装 出错的解决

mac os 下openresty源码安装 出错的解决

作者: 我了个去111 | 来源:发表于2019-05-04 16:09 被阅读0次

    源码安装执行到
    ./configure
    出错:

    ./configure: error: the HTTP rewrite module requires the PCRE library.
    You can either disable the module by using --without-http_rewrite_module
    option, or install the PCRE library into the system, or build the PCRE library
    statically from the source with nginx by using --with-pcre=<path> option.
    
    ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...
    

    解决方法:

    brew update
    brew install pcre openssl
    

    然后又出错:

    ./configure: error: SSL modules require the OpenSSL library.
    You can either do not enable the modules, or install the OpenSSL library
    into the system, or build the OpenSSL library statically from the source
    with nginx by using --with-openssl=<path> option.
    
    ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...
    

    网上有人说解决方法是:告诉他openssl位置(错误的解决方法)

    ./configure --with-openssl=/usr/local/Cellar/openssl/1.0.2r
    

    但是,不好使。

    正确的解决方法应该是:用--with-openssl 告诉它的是源码位置
    https://www.openssl.org/下载了最新的,openssl.1.0.2r版本,到bundle目录里:

    ./configure --with-openssl=bundle/openssl-1.0.2r
    

    然后 make
    然后 sudo make install
    ·

    相关文章

      网友评论

          本文标题:mac os 下openresty源码安装 出错的解决

          本文链接:https://www.haomeiwen.com/subject/cqaxoqtx.html