编译Fastdfs报错——In file included from ../common/fdfs_global.c:21:0: ../common/fdfs_global.h:15:26: 致命错误...

记录一下安装 fastdfs 时编译报错,报错信息如下:

编译Fastdfs报错——In file included from ../common/fdfs_global.c:21:0: ../common/fdfs_global.h:15:26: 致命错误..._第1张图片

原因:

这是因为我们在安装较新版得 fastdfs 时,从github 下载得安装包缺少文件,如果按照网上很多博主较早之前写的文档操作得话就会出现这样得错误,缺少了 libserverframe 网络框架

解决方法:安装 libserverframe 网络框架

安装包下载地址:https://github.com/happyfish100/libserverframe

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

安装完成后返回重新编译 fastdfs,发现一切正常啦

编译Fastdfs报错——In file included from ../common/fdfs_global.c:21:0: ../common/fdfs_global.h:15:26: 致命错误..._第2张图片

你可能感兴趣的:(编译Fastdfs报错——In file included from ../common/fdfs_global.c:21:0: ../common/fdfs_global.h:15:26: 致命错误...)