ubuntu里安装FastDFS 编译失败,请大神看看

root@ubuntu:/usr/FastDFS#sudo./make.sh./make.sh:1:./make.sh:tmp_src_filename=... root@ubuntu:/usr/FastDFS# sudo ./make.sh
./make.sh: 1: ./make.sh: tmp_src_filename=fdfs_check_bits.c: not found
./make.sh: 2: ./make.sh: cannot create : Directory nonexistent
gcc: fatal error: no input files
compilation terminated.
./make.sh: 1: ./make.sh: ./a.out: not found
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DWITH_HTTPD -c -o tracker_proto.o tracker_proto.c -I../common -I/usr/local/include
In file included from tracker_proto.c:23:0:
tracker_types.h:19:19: fatal error: event.h: No such file or directory
compilation terminated.
make: *** [tracker_proto.o] Error 1
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DWITH_HTTPD -c -o ../tracker/tracker_proto.o ../tracker/tracker_proto.c -I../common -I../tracker -I../client -Ifdht_client -I/usr/local/include
In file included from ../tracker/tracker_proto.c:23:0:
../tracker/tracker_types.h:19:19: fatal error: event.h: No such file or directory
compilation terminated.
make: *** [../tracker/tracker_proto.o] Error 1
cc -Wall -O -D_FILE_OFFSET_BITS=64 -g -DDEBUG_FLAG -DOS_LINUX -DWITH_HTTPD -c -o ../tracker/tracker_proto.o ../tracker/tracker_proto.c -I../common -I../tracker -I/usr/local/include
In file included from ../tracker/tracker_proto.c:23:0:
../tracker/tracker_types.h:19:19: fatal error: event.h: No such file or directory
compilation terminated.
make: *** [../tracker/tracker_proto.o] Error 1
展开
 我来答
匿名用户
2015-03-08
展开全部
其实是不同的系统中pthread位置不一样,做法就是找到你的系统中所需要的libpthread.so文件位置,直接find就可以找到了;
root@ www.linuxidc.com:~# find / -name 'libpthread.a'
/usr/lib/i386-linux-gnu/xen/libpthread.a
/usr/lib/i386-linux-gnu/libpthread.a
root@ www.linuxidc.com:~# find / -name 'libpthread.so'
/usr/lib/i386-linux-gnu/libpthread.so
接着直接在make.sh中找到这句话然后替换掉就可以了:
if [ -f /usr/lib/libpthread.so ] || [ -f /usr/local/lib/libpthread.so ] || [ -f /usr/lib64/libpthread.so ] || [ -f /usr/lib/libpthread.a ] || [ -f /usr/local/lib/libpthread.a ] || [ -f /usr/lib64/libpthread.a ]; then LIBS="$LIBS -lpthread"
然后在进行编译就OK了。
追问
全部都要替换吗
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式