模块名称描述开启选项
SSL支持HHTTPS/SSL--with-http_ssl_module
Gzip Precompression压缩静态文件--with-http_gzip_static_module
MP4支持MP4--with-http_mp4_module

问题记录

  1. 提示缺少PCRE库:

    ./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.

    解决办法

    CentOS
    yum install -y pcre pcre-devel
    Debian
    apt-get install libpcre3-dev

  2. 提示缺少zlib库

    ./configure: error: the HTTP gzip module requires the zlib library.
    You can either disable the module by using --without-http_gzip_module
    option, or install the zlib library into the system, or build the zlib library
    statically from the source with nginx by using --with-zlib=<path> option.

    解决办法

    CentOS
    yum install -y zlib-devel
    Debian
    apt-get install zlib1g-dev

  3. 提示缺少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.

    解决办法

    CentOS
    yum -y install openssl openssl-devel
    Debian

    apt-get install openssl
    apt-get install libssl-dev
    
    # 如果安装后还找不到opensll, configure命令增加--with-ssl参数
    ./configure --with-ssl=/usr/include/openssl

YYGP
25 声望11 粉丝

写BUG