在对nginx进行编译时报了如下图所示错误
src/os/unix/ngx_user.c: In function ‘ngx_libc_crypt’:
src/os/unix/ngx_user.c:36:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
cd.current_salt[0] = ~salt[0];
^
make[1]: *** [objs/Makefile:774: objs/src/os/unix/ngx_user.o] Error 1
make[1]: Leaving directory '/root/nginx-1.10.1'
make: *** [Makefile:8: build] Error 2
看到这种错误时不要慌,注意观察报错内容,当出现第二个错误时,进入objs/Makefile,打开Makefile文件将编译选项中的CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -werror -g中的“-werror"删除
当出现第一种错误‘current_salt’cd.current_salt[0] = ~salt[0]错误,找到错误报的内容,如图一所示 view src/os/unix/ngx_usr.c,找到第36行,将36行中current_salt’cd.current_salt[0] = ~salt[0]给删除掉,然后保存:wq!,再次编译nginx,执行成功
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)