nginx1.6在CentOS8中错误解决方案|struct crypt_data’ has no member named ‘current_salt’ |[objs/Makefile:473

前言:

该版本的nginx在RHEL6.5,RHEL7.2上,安装部署一切正常,但是在CentOS7上,总是能遇到一些奇葩的问题。下面是解决方案。

一、make编译时错误处理办法

#cd /usr/src/nginx-1.6.2
#ls
#./configure --prefix=/usr/local/nginx --user=nginx --group=nginx 这一步正常

#make -j 4 编译时报错

编译的时候报错了:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘current_salt’ 

 nginx1.6在CentOS8中错误解决方案|struct crypt_data’ has no member named ‘current_salt’ |[objs/Makefile:473

 处理步骤

1、根据提示,进入src/os/unix/ngx_user.c ,注释一行代码

#cd /usr/src/nginx-1.6.2
#vim src/os/unix/ngx_user.c 进入根据上面的提示,注释一行代码

nginx1.6在CentOS8中错误解决方案|struct crypt_data’ has no member named ‘current_salt’ |[objs/Makefile:473

 :wq保存并退出,至此问题解决。

二、make install安装时错误处理办法 

#make install 报错

[objs/Makefile:473: objs/src/core/ngx murmurhash.o] Error 1

 nginx1.6在CentOS8中错误解决方案|struct crypt_data’ has no member named ‘current_salt’ |[objs/Makefile:473

 解决步骤

#cd /usr/src/nginx-1.6.2
#ls
#vim objs/Makefile 

 删除-Werror后,:wq保存并退出就可以了。

nginx1.6在CentOS8中错误解决方案|struct crypt_data’ has no member named ‘current_salt’ |[objs/Makefile:473

具体参考:https://blog.csdn.net/oqzuser12345678999q/article/details/110470392
至此,问题解决。

上一篇:nginx编译参数详解


下一篇:VMware Linux虚拟机问题-虚拟机网卡无法桥接物理主机网卡问题处理