编译nginx时struct crypt_data’没有名为‘current_salt’的成员:cd.current_salt[0] = ~salt[0];的解决方案

make出现一个错误

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

这里提示我们struct crypt_data’没有名为‘current_salt’的成员:cd.current_salt[0] = ~salt[0];

最好的办法是换一个版本,因为条件限制,我们就进到源码里把这行直接注释掉好了。

[root@iZgt88z6l1kvd7Z nginx-1.10.1]# vim src/os/unix/ngx_user.c
进去找到第36行


再次make就好了

猜你喜欢

转载自www.cnblogs.com/hxlinux/p/12900503.html