写了一个fdfs脚本,自动化执行脚本,在编译nginx,加载模块fastdfs-nginx-module-1.20的时候,出现了如上图的报错
解决方案:
可能的报错:2 / usr / include / fastdfs / fdfs_define . h : 15 : 27 : fatal error : common_define . h : No such file or directory3 解决方案:修改 fastdfs ‐ nginx ‐ module ‐ 1.20 / src / config 文件,然后重新编译安装就好4 ngx_module_incs = "/usr/include/fastdfs /usr/include/fastcommon/"5 CORE_INCS = "$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"
我在脚本中写是:
sed -i 's#ngx_module_incs="/usr/local/include"#ngx_module_incs="/usr/include/fastdfs /usr/include/fastcommon/"#g' /root/fastdfs-nginx-module-1.20/src/config
sed -i 's#CORE_INCS="$CORE_INCS /usr/local/include"#CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon/"#g' /root/fastdfs-nginx-module-1.20/src/config
然后没问题啦