zoukankan      html  css  js  c++  java
  • 记录一次失败的Nginx via cygwin编译体验

    Generate make file:

    Linux:

    ./auto/configure 
        --prefix= 
        --conf-path=conf/nginx.conf 
        --pid-path=logs/nginx.pid 
        --http-log-path=logs/access.log 
        --error-log-path=logs/error.log 
        --with-pcre=lib/pcre-8.44 
        --with-zlib=lib/zlib-1.2.11 
        --with-openssl=lib/openssl-OpenSSL_1_1_1i 
        --add-module=./nginx-http-flv-module
    

    cygwin(一次不愉快的体验):

    ./auto/configure 
        --with-cc=gcc 
        --with-debug 
        --prefix= 
        --conf-path=conf/nginx.conf 
        --pid-path=logs/nginx.pid 
        --http-log-path=logs/access.log 
        --error-log-path=logs/error.log 
        --sbin-path=nginx.exe 
        --http-client-body-temp-path=temp/client_body_temp 
        --http-proxy-temp-path=temp/proxy_temp 
        --http-fastcgi-temp-path=temp/fastcgi_temp 
        --http-scgi-temp-path=temp/scgi_temp 
        --http-uwsgi-temp-path=temp/uwsgi_temp 
        --with-cc-opt=-DFD_SETSIZE=1024 
        --with-pcre=objs/lib/pcre-8.44 
        --with-zlib=objs/lib/zlib-1.2.11 
        --with-openssl=objs/lib/openssl-OpenSSL_1_1_1h 
        --with-openssl-opt=no-asm 
        --with-http_ssl_module
    

    报错:

    configure: error: Invalid C++ compiler or C++ compiler flags
    make[1]: *** [objs/Makefile:1227: objs/lib/pcre-8.44/Makefile] Error 1
    

    移除HTTP重写模块--without-http_rewrite_module, 删除pcre依赖:

    ./auto/configure 
        --with-cc=gcc 
        --with-debug 
        --prefix= 
        --conf-path=conf/nginx.conf 
        --pid-path=logs/nginx.pid 
        --http-log-path=logs/access.log 
        --error-log-path=logs/error.log 
        --sbin-path=nginx.exe 
        --http-client-body-temp-path=temp/client_body_temp 
        --http-proxy-temp-path=temp/proxy_temp 
        --http-fastcgi-temp-path=temp/fastcgi_temp 
        --http-scgi-temp-path=temp/scgi_temp 
        --http-uwsgi-temp-path=temp/uwsgi_temp 
        --with-cc-opt=-DFD_SETSIZE=1024 
        --with-zlib=objs/lib/zlib-1.2.11 
        --with-openssl=objs/lib/openssl-OpenSSL_1_1_1h 
        --with-openssl-opt=no-asm 
        --with-http_ssl_module 
        --without-http_rewrite_module
    

    报错:

    找不到crypt()函数
    

    添加模块

        --add-module=./nginx-http-flv-module
        --add-dynamic-module=./nginx-http-flv-module
    

    See: http://nginx.org/en/docs/howto_build_on_win32.html

  • 相关阅读:
    封装、权限修饰符、包、构造器
    从Discuz!NT v2.0扣出来的生成静态页面的方法
    C#中struct与class的区别
    Asp.Net中虚拟文件系统的使用
    C#生成中文验证码
    C#导入Excel表
    IIS5、IIS6、IIS7的ASP.net 请求处理过程比较
    如何保证Session值不丢失
    C#抽象类与接口的区别
    C#实现DES加密解密
  • 原文地址:https://www.cnblogs.com/develon/p/14247811.html
Copyright © 2011-2022 走看看