美文网首页
编译nginx时struct crypt_data’没有名为‘c

编译nginx时struct crypt_data’没有名为‘c

作者: mutang | 来源:发表于2020-08-12 16:12 被阅读0次

转载:https://www.cnblogs.com/hxlinux/p/12900503.html

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];

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

image

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

image image

再次make就好了

相关文章

网友评论

      本文标题:编译nginx时struct crypt_data’没有名为‘c

      本文链接:https://www.haomeiwen.com/subject/dyhmdktx.html