fastdfs
fastdfs copied to clipboard
FastDFS本体make报错,急求解决
新装的centos7环境,编译环境已经准备好,libfatscommon已完成编译,lib和lib64中均已生成libfastcommon.so 但是FastDFS本体make编译时报错,倒腾一整天要崩溃了,有大神能帮我看看哪里的问题么
[root@localhost fastdfs-master-6.06]# ./make.sh && ./make.sh install cc -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 /usr/include/fastcommon/connection_pool.h:20:0, from ../common/fdfs_global.h:16, from ../common/fdfs_global.c:21: /usr/include/fastcommon/hash.h:208:1: 错误:未知的类型名‘string_t’ static inline void *hash_find1(HashArray *pHash, const string_t *key) ^ /usr/include/fastcommon/hash.h: 在函数‘hash_find1’中: /usr/include/fastcommon/hash.h:210:32: 错误:在非结构或联合中请求成员‘str’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h:210:42: 错误:在非结构或联合中请求成员‘len’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h: 在文件作用域: /usr/include/fastcommon/hash.h:221:1: 错误:未知的类型名‘string_t’ int hash_find2(HashArray *pHash, const string_t *key, string_t *value); ^ /usr/include/fastcommon/hash.h:221:55: 错误:未知的类型名‘string_t’ int hash_find2(HashArray *pHash, const string_t *key, string_t *value); ^ /usr/include/fastcommon/hash.h:230:1: 错误:未知的类型名‘string_t’ HashData *hash_find1_ex(HashArray *pHash, const string_t *key); ^ ../common/fdfs_global.c:23:30: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) int g_fdfs_connect_timeout = DEFAULT_CONNECT_TIMEOUT; ^ make: *** [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O1 -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon In file included from /usr/include/fastcommon/connection_pool.h:20:0, from ../common/fdfs_global.h:16, from ../common/fdfs_global.c:21: /usr/include/fastcommon/hash.h:208:1: 错误:未知的类型名‘string_t’ static inline void *hash_find1(HashArray *pHash, const string_t *key) ^ /usr/include/fastcommon/hash.h: 在函数‘hash_find1’中: /usr/include/fastcommon/hash.h:210:32: 错误:在非结构或联合中请求成员‘str’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h:210:42: 错误:在非结构或联合中请求成员‘len’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h: 在文件作用域: /usr/include/fastcommon/hash.h:221:1: 错误:未知的类型名‘string_t’ int hash_find2(HashArray *pHash, const string_t *key, string_t *value); ^ /usr/include/fastcommon/hash.h:221:55: 错误:未知的类型名‘string_t’ int hash_find2(HashArray *pHash, const string_t *key, string_t *value); ^ /usr/include/fastcommon/hash.h:230:1: 错误:未知的类型名‘string_t’ HashData *hash_find1_ex(HashArray *pHash, const string_t *key); ^ ../common/fdfs_global.c:23:30: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) int g_fdfs_connect_timeout = DEFAULT_CONNECT_TIMEOUT; ^ make: *** [../common/fdfs_global.o] 错误 1 cc -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../tracker -I/usr/include/fastcommon In file included from /usr/include/fastcommon/connection_pool.h:20:0, from ../common/fdfs_global.h:16, from ../common/fdfs_global.c:21: /usr/include/fastcommon/hash.h:208:1: 错误:未知的类型名‘string_t’ static inline void *hash_find1(HashArray *pHash, const string_t *key) ^ /usr/include/fastcommon/hash.h: 在函数‘hash_find1’中: /usr/include/fastcommon/hash.h:210:32: 错误:在非结构或联合中请求成员‘str’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h:210:42: 错误:在非结构或联合中请求成员‘len’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h: 在文件作用域: /usr/include/fastcommon/hash.h:221:1: 错误:未知的类型名‘string_t’ int hash_find2(HashArray *pHash, const string_t *key, string_t *value); ^ /usr/include/fastcommon/hash.h:221:55: 错误:未知的类型名‘string_t’ int hash_find2(HashArray *pHash, const string_t *key, string_t *value); ^ /usr/include/fastcommon/hash.h:230:1: 错误:未知的类型名‘string_t’ HashData *hash_find1_ex(HashArray *pHash, const string_t *key); ^ ../common/fdfs_global.c:23:30: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) int g_fdfs_connect_timeout = DEFAULT_CONNECT_TIMEOUT; ^ make: *** [../common/fdfs_global.o] 错误 1 mkdir -p /usr/bin mkdir -p /etc/fdfs cp -f fdfs_trackerd /usr/bin cp: 无法获取"fdfs_trackerd" 的文件状态(stat): 没有那个文件或目录 make: *** [install] 错误 1 mkdir -p /usr/bin mkdir -p /etc/fdfs cp -f fdfs_storaged /usr/bin cp: 无法获取"fdfs_storaged" 的文件状态(stat): 没有那个文件或目录 make: *** [install] 错误 1 mkdir -p /usr/bin mkdir -p /etc/fdfs mkdir -p /usr/lib64 mkdir -p /usr/lib cp -f fdfs_monitor fdfs_test fdfs_test1 fdfs_crc32 fdfs_upload_file fdfs_download_file fdfs_delete_file fdfs_file_info fdfs_appender_test fdfs_appender_test1 fdfs_append_file fdfs_upload_appender fdfs_regenerate_filename /usr/bin cp: 无法获取"fdfs_monitor" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_test" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_test1" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_crc32" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_upload_file" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_download_file" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_delete_file" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_file_info" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_appender_test" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_appender_test1" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_append_file" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_upload_appender" 的文件状态(stat): 没有那个文件或目录 cp: 无法获取"fdfs_regenerate_filename" 的文件状态(stat): 没有那个文件或目录 make: *** [install] 错误 1
libfastcommon要安装v1.42或v1.43,请确认是否正确编译和安装。
遇到同样的问题 请问如何解决 @359036072
是不是原先有安装过,我同样遇到此报错,然后环境全部删除重新来了一遍,后面成功了,搭建记录:https://blog.csdn.net/tian330726/article/details/106606755
root 用户下执行
find /usr -name "fastcommon*"
find /usr -name "libfastcommon*"
rm -rf /usr/local/include/fastcommon*
rm -rf /usr/include/fastcommon*
rm /usr/local/lib/libfastcommon.so /usr/lib/libfastcommon.so /usr/lib64/libfastcommon.so