zoukankan      html  css  js  c++  java
  • Nginx安装 出现 In function ‘ngx_murmur_hash2’错误

    阅读原文

    
    src/core/ngx_murmurhash.c: In function ‘ngx_murmur_hash2’:
    src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
             h ^= data[2] << 16;
             ~~^~~~~~~~~~~~~~~~
    src/core/ngx_murmurhash.c:38:5: note: here
         case 2:
         ^~~~
    src/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
             h ^= data[1] << 8;
             ~~^~~~~~~~~~~~~~~
    src/core/ngx_murmurhash.c:40:5: note: here
         case 1:
         ^~~~
    cc1: all warnings being treated as errors
    make[1]: *** [objs/Makefile:432: objs/src/core/ngx_murmurhash.o] Error 1
    
    

    原因:将警告信息当作错误信息进行了处理
    解决方法:使用编辑器打开nginx/objs/Makefile,删除CFLAGS中的-Werror,如图所示;

    重新进行make操作即可

    接着你会出现问题

    src/os/unix/ngx_user.c: In function ‘ngx_libc_crypt’:
    src/os/unix/ngx_user.c:35:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
         cd.current_salt[0] = ~salt[0];
           ^
    make[1]: *** [objs/Makefile:712: objs/src/os/unix/ngx_user.o] Error 1
    

    原因:源代码问题
    解决方法:修改ngx_user.c /src/os/unix/ngx_user.c

    注释掉蓝线标注的代码
    重新make即可成功

  • 相关阅读:
    HTTP/2的优先级
    JavaScript 日期权威指南
    岂曰无衣与子同袍
    Android项目中实现native调用
    关键渲染路径
    @ModelAttribute使用详解
    @SessionAttribute使用详解
    @ControllerAdvice 拦截异常并统一处理
    js获取文件MD5值
    Mybatis分页插件PageHelper的配置和使用方法
  • 原文地址:https://www.cnblogs.com/userzf/p/15204844.html
Copyright © 2011-2022 走看看