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

  • 相关阅读:
    CentOS7中Tomcat的安装和配置
    CentOS7中JDK的安装和配置
    Linux基本指令
    MySQL数据库索引:索引介绍和使用原则
    MongoDB基础篇2:数据库/用户/数据集合的增删改
    MongoDB基础篇1:安装和服务配置
    JSTL fn:replace()函数替换 换行符
    LeetCode440. 字典序的第K小数字
    kubeadm搭建kubernetes-1.13.2集群
    kubernetes(k8s)kubectl使用详解
  • 原文地址:https://www.cnblogs.com/develon/p/14247811.html
Copyright © 2011-2022 走看看