fastdfs+nginx make時報錯fatal error:fdfs_define.h: 沒有那個文件或目錄


環境:

ubuntu 18.04.1

fastdfs-nginx-module_v1.16

root@wang-machine:~/桌面/FastDFS# cd nginx-1.8.1/
root@wang-machine:~/桌面/FastDFS/nginx-1.8.1# sudo ./configure --prefix=/usr/local/nginx/ --add-module=/home/wang/桌面/FastDFS/fastdfs-nginx-module/src

root@wang-machine:~/桌面/FastDFS/nginx-1.8.1# make

若提示: error: this statement may fall through [-Werror=implicit-fallthrough=]

則進入/nginx-1.8/objs/Makefile   找到 -Werrori 后將其去掉 在重新make編譯就可以了。

 

接着提示:

/home/wang/桌面/FastDFS/fastdfs-nginx-module/src/common.c:21:10: fatal error: fdfs_define.h: 沒有那個文件或目錄
#include "fdfs_define.h"
^~~~~~~~~~~~~~~
compilation terminated.
objs/Makefile:1098: recipe for target 'objs/addon/src/ngx_http_fastdfs_module.o' failed

 

敲入命令創建軟連接:

ln -sv /usr/include/fastcommon /usr/local/include/fastcommon 
ln -sv /usr/include/fastdfs /usr/local/include/fastdfs 
ln -sv /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so

再次make

sudo make install

OK。

此問題搗鼓了整整24小時,自學艱辛,記錄一下。

感謝http://bbs.chinaunix.net/thread-4162818-1-1.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM