Ubuntu部署Django项目,在安装nginx时候报错src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
2024-12-19     loonlog     61     0
本文目录
Ubuntu部署Django项目,在安装nginx时候报错src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
/usr/local 目录执行下面命令下载nginx源码:
wget http://nginx.org/download/nginx-1.13.7.tar.gz
然后解压它:
tar -zxvf nginx-1.13.7.tar.gz
cd 进入解压后的nginx-1.13.7文件夹,依次执行以下命令:
sudo ./configure sudo make sudo make install
在进行
sudo make
的时候报错,如下
src/os/unix/ngx_user.c: In function ‘ngx_libc_crypt’: src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘current_salt’ 26 | cd.current_salt[0] = ~salt[0]; | ^ make[1]: *** [objs/Makefile:781: objs/src/os/unix/ngx_user.o] Error 1 make[1]: Leaving directory '/usr/local/nginx-1.13.7' make: *** [Makefile:8: build] Error 2
注意观察报错内容,
log更上面的信息我这里么有贴出来,这里报错主要是把报警信息当成报错了。
当出现第一种错误‘current_salt’cd.current_salt[0] = ~salt[0]错误,找到错误报的内容前面提示的路径文件信息“src/os/unix/ngx_user.c”,找到第26行,将26行中cd.current_salt[0] = ~salt[0]; 给删除掉,然后保存
当出现第二个错误时,进入objs/Makefile,打开Makefile文件将编译选项中的CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -werror -g中的“-werror"删除,然后保存
再次编译nginx,执行成功
Ubuntu部署Django项目,在安装nginx时候报错src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘current_salt’
http://loonlog.com/2024/12/19/ubuntu-django-nginx-src-osu-nixngx_userc267-error-struct-crypt_data-has-no-member-named-current_salt/
http://loonlog.com/2024/12/19/ubuntu-django-nginx-src-osu-nixngx_userc267-error-struct-crypt_data-has-no-member-named-current_salt/
评论列表,共 0 条评论
暂无评论