编译 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://www.toymoban.com/news/detail-832773.html
文章来源地址https://www.toymoban.com/news/detail-832773.html
到了这里,关于编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!