objs/Makefile:540: recipe for target ‘objs/src/core/ngx_murmurhash.o‘ failed

18 篇文章 2 订阅
4 篇文章 0 订阅

 问题描述:

本地虚拟机Ubuntu16.04系统中,搭建nginx-rtmp服务,成功。参考链接

然后就想着在云服务器上,也搭建一套,这样,就不限于局域网内推拉流了。

云服务器系统是 :

Linux iZj6c2ewtk1bhux0vwm2imZ 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

然后就按照上面的操作,选择nginx-1.12.1,进行配置。

结果出现如下问题: 

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
objs/Makefile:540: recipe for target 'objs/src/core/ngx_murmurhash.o' failed
make[1]: *** [objs/src/core/ngx_murmurhash.o] Error 1
make[1]: Leaving directory '/home/dyx/nginx/nginx-1.12.1'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

解决方案:

一、尝试

网上一大票的解决方案是:

找到naginx解压目录下,objs目录下,Makefile文件,然后注释掉第三行中 -Werror。

我也这么做了,但是还是报错误。我的错误代码是540,别人都是460.

二、尝试

干脆换一个版本,下载 nginx-1.12.2, 进行测试。

依然需要像上面一样,改动一下 -Wrerror. 

 

然后顺利通过。折腾了一天,最后原来是版本问题,舒心了。。。

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值