compilation -/usr/bin/ld : cannot find -lhdf5_hl

标签 compilation installation ld caffe

我正在尝试编译 caffe,同时运行 make all命令,我有这个链接错误:

LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

我该如何解决这个问题?

最佳答案

在您的 Makefile.config 中更改以下内容:

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
请注意,路径可能因您的操作系统而异。

关于compilation -/usr/bin/ld : cannot find -lhdf5_hl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39805867/

相关文章:

linker - 黄金链接器 ld.gold -plugin : unknown option

ios - 几乎赤裸裸的iOS8.4 --> 如何获取链接器?

java - 在编译时或运行时编程

java - Gradle编译项目 list 为空

c++ - Dev C++ 编译错误,权限被拒绝

windows - 如何创建 MSI 包,它可以安装 Windows 安装程序本身

testing - TeamCity - 使用 JUnit 进行测试

java - 使用java代码以编程方式创建android应用程序

Android:如何仅在安装应用程序时调用方法

c++ - 如何与命令 ld 链接