问题描述
- osx下编译hadoop-2.5.2-src出错
- [exec] /usr/bin/cc -g -Wall -O2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wl-search_paths_first -Wl-headerpad_max_install_names CMakeFiles/test_libhdfs_vecsum.dir/main/native/libhdfs/test/vecsum.c.o -o test_libhdfs_vecsum target/usr/local/lib/libhdfs.0.0.0.dylib -lpthread -lrt /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/server/libjvm.dylib -ldl -lpthread -Wl-rpath/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/server
[exec] ld: library not found for -lrt
[exec] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[exec] make[2]: *** [test_libhdfs_vecsum] Error 1
[exec] make[1]: *** [CMakeFiles/test_libhdfs_vecsum.dir/all] Error 2
[exec] make: *** [all] Error 2
解决方案
lrt库没有找到,你需要先安装这个类库,编译的时候需要找到这个lib
解决方案二:
参考下:http://my.oschina.net/KingPan/blog/287050
解决方案三:
你的了他 嗯吗吗吗得到
时间: 2024-12-01 10:17:01