Ubuntu部署Django项目,在安装nginx时候报错src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘current_salt’

💡 原文中文,约1100字,阅读约需3分钟。
📝

内容提要

在Ubuntu上部署Django项目时,安装nginx出现错误。解决方法是删除ngx_user.c文件第26行的“cd.current_salt[0] = ~salt[0];”,并在Makefile中去掉“-werror”选项,重新编译nginx即可。

🎯

关键要点

  • 在Ubuntu上部署Django项目时,安装nginx出现错误。
  • 错误信息显示‘struct crypt_data’没有名为‘current_salt’的成员。
  • 下载nginx源码并解压后,进入解压后的文件夹进行编译。
  • 编译过程中出现错误,提示在src/os/unix/ngx_user.c的第26行。
  • 解决方法是删除第26行的‘cd.current_salt[0] = ~salt[0];’。
  • 还需在Makefile中去掉‘-werror’选项。
  • 修改后重新编译nginx,编译成功。
➡️

继续阅读