编译 FastDFS 时报错 fatal error: sf/sf

编译 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"

在这里插入图片描述

原因:

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

在这里插入图片描述

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

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

在这里插入图片描述

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/79da314580.html