编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法

编译 FastDFS 时,报错如下

gcc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O1 -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c  -I../common -I/usr/local/include
In file included from ../common/fdfs_global.c:21:0:
../common/fdfs_global.h:17:26: fatal error: sf/sf_global.h: No such file or directory
 #include "sf/sf_global.h"

编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法_第1张图片

原因:

需要先编译和安装 libserverframe,新引入的网络框架库,下载地址:https://github.com/happyfish100

编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法_第2张图片

unzip libserverframe-master.zip
cd libserverframe-master/
./make.sh
./make.sh install

编译安装完后即可正常编译安装 FastDFS

编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法_第3张图片

你可能感兴趣的:(FastDFS,hdfs)