安装caffe /usr/bin/ld: cannot find -lhdf5

 每次安装都是新的体验:

如果编译caffe时提示找不到libhdf5.so , 错误提示为:/usr/bin/ld: cannot find -lhdf5
使用命令sudo find / -name libhdf5.so , 我找到的路径为:
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so , 此时要修改Makefile.config中的项“LIBRARY_DIRS”为:
LIBRARY_DIRS := $(PYTHON_LIB) /usr/lib/x86_64-linux-gnu/hdf5/serial \
            /usr/local/lib /usr/lib

猜你喜欢

转载自blog.csdn.net/LBJ_python/article/details/83626333