WDlinux官方论坛's Archiver

iceamber 发表于 2018-11-11 15:38

lanmp一键包安装失败

在kali下载lanmp_laster.tar.gz一键包,解压后安装失败[code]src/core/ngx_murmurhash.c: 在函数‘ngx_murmur_hash2’中:
src/core/ngx_murmurhash.c:37:11: 错误:this statement may fall through [-Werror=implicit-fallthrough=]
         h ^= data[2] << 16;
         ~~^~~~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:38:5: 附注:here
     case 2:
     ^~~~
src/core/ngx_murmurhash.c:39:11: 错误:this statement may fall through [-Werror=implicit-fallthrough=]
         h ^= data[1] << 8;
         ~~^~~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:40:5: 附注:here
     case 1:
     ^~~~
cc1:所有的警告都被当作是错误
make[1]: *** [objs/Makefile:445:objs/src/core/ngx_murmurhash.o] 错误 1
make[1]: *** 正在等待未完成的任务....
make[1]: 离开目录“/home/iceamber/lanmp/src/nginx-1.8.1”
make: *** [Makefile:8:build] 错误 2
[/code]

xooass 发表于 2019-9-30 03:52

别怪我挖坟,相同问题,求解

xooass 发表于 2019-9-30 15:42

[quote]在kali下载lanmp_laster.tar.gz一键包,解压后安装失败
[size=2][color=#999999]iceamber 发表于 2018-11-11 15:38[/color] [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=109333&ptid=63426][img]http://www.wdlinux.cn/bbs/images/common/back.gif[/img][/url][/size][/quote]


   解决方法:
一键安装包解压后会产生一个lib目录,进入此目录,编辑nginx.sh文件,找到
[code]        --with-http_realip_module \[/code]
在这行下面加上下面这句:
[code]--with-cc-opt=-Wno-error \[/code]



编译参数最终效果看起来是这样:

[code]    ./configure --user=www --group=www \
        --prefix=$IN_DIR/nginx-$NGI_VER \
        --with-http_stub_status_module \
        --with-ipv6 \
        --with-http_gzip_static_module \
        --with-http_realip_module \
        --with-cc-opt=-Wno-error \
        --with-http_ssl_module[/code]


保存,重新运行sh lanmp.sh即可。

24447678@qq.com 发表于 2020-6-16 16:22

安装了几次,然后今天也是第一次遇到这个问题。是不是脚本的兼容性不好?

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.