centos8编译nginx报错src/os/unix/ngx_user.c:36:7: 错误:‘struct crypt_data’没有名为‘current_salt’的成员 cd.current_salt[0] = ~salt[0];的解决办法

cnbugs cnbugs 关注 VIP用户组 3级
发表于linux服务版块
报错信息:

src/os/unix/ngx_user.c: 在函数‘ngx_libc_crypt’中:
src/os/unix/ngx_user.c:36:7: 错误:‘struct crypt_data’没有名为‘current_salt’的成员
     cd.current_salt[0] = ~salt[0];
网上说好像是centos8版本过高导致,具体什么的这里也不在细说了,有兴趣的可以自己百度或者谷歌。下面给出解决办法

[root@lnmp nginx-1.8.1]# vim src/os/unix/ngx_user.c 
36  /*cd.current_salt[0] = ~salt[0];*/
利用/*和*/注释掉第36行即可,这是C写的,使用#号注释不好使,反正我是不好使,注释完之后重新编译就可以了。

评论列表 评论
发布评论

评论: centos8编译nginx报错src/os/unix/ngx_user.c:36:7: 错误:‘struct crypt_data’没有名为‘current_salt’的成员 cd.current_salt[0] = ~salt[0];的解决办法

(0) 分享
分享
取消
我的客服