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

  • 相关阅读:
    js点击重置按钮重置表单
    Flash文件在asp页面无法播放,网页上面的Flash文件在火狐浏览器不播放
    更新域名解析以后,IP在cmd中ping不正确,清理DNS缓存
    简单PHP会话(session)说明
    delphi 事件和属性的绑定
    读书笔记(乡土中国)
    读书笔记(支付战争)
    读书笔记(从0到1)
    读书笔记(创业维艰)
    读书笔记(三体)
  • 原文地址:https://www.cnblogs.com/develon/p/14247811.html
Copyright © 2011-2022 走看看