错误描述

src/caffe/net.cpp::: fatal error: hdf5.h: No such file or directory compilation terminated. Makefile:: recipe for target '.build_release/src/caffe/net.o' failed make: *** [.build_release/src/caffe/net.o] Error 

操作过程

step1:

Makefile.config文件更改INCLUDE_DIRS和LIBRARY_DIRS的内容,添加/usr/include/hdf5/serial/ 到 INCLUDE_DIRS,也就是把下面第一行代码改为第二行代码。

#INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
#LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

改为

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 /usr/lib/x86_64-linux-gnu/hdf5/serial

step2:

Makefile文件的LIBRARIES,把 hdf5_hl 和hdf5修改为hdf5_serial_hl 和 hdf5_serial,也就是把下面第一行代码改为第二行代码。

#LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

注意:如果按照上述步骤改过之后仍然出现同样的错误,那可能是hdf5的路径不匹配,需要locate寻找hdf5的路径,然后更改为所在系统的安装路径。

这个错误表明,我们的hdf5.h这个头文件的路径没有被找到,如果你没有安装HDF5这个文件 ,那当然是找不到的。再者,就然你安装了这个文件也可能找不到,那么我们怎么办。我们用locate hdf5.h找到你安装的路径,然后在makefile.conf文件中相应指定就好了。

参考

1.caffe编译问题

2.caffe编译hdf5问题

caffe编译问题-src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory compilation terminated.的更多相关文章

  1. qingstor python-sdk 安装错误 src/MD2.c:31:20: fatal error: Python.h: No such file or directory

    ubuntu安装python qingstor-sdk, src/MD2.c:31:20: fatal error: Python.h: No such file or directory compi ...

  2. Centos 7.5源码编译安装zabbix4.0报fatal error: mysql.h: No such file or directory

    系统环境:CentOS 7.5是最小化安装的 编译信息 编译选项: root@Server01 zabbix-]# ./configure --prefix=/usr/share/applicatio ...

  3. tesseract编译错误:fatal error: allheaders.h: No such file or directory

    错误描述: globaloc.cpp::: fatal error: allheaders.h: No such file or directory #include "allheaders ...

  4. 解决 src/MD2.c:31:20: fatal error: Python.h: No such file or directory安装包错误

    在linux命令行安装包时报错 src/MD2.c:31:20: fatal error: Python.h: No such file or directory 原因:缺少了python的dev 解 ...

  5. 编译boost python模块遇到的错误:../../libraries/boost_1_44_0/boost/python/detail/wrap_python.hpp:75:24: fatal error: patchlevel.h: No such file or directory

    就是遇到类似标题上面的错误. 原因是没有安装对应python的python-dev依赖,不然编译到boost python模块的时候就会出错. 所以解决方案是sudo apt-get install ...

  6. 编译openwrt时报错build_dir/hostpkg/libubox-2018-07-25-c83a84af/blobmsg_json.c:21:19: fatal error: json.h: No such file or directory

    答: 一. 详细日志: build_dir/hostpkg/libubox-2018-07-25-c83a84af/blobmsg_json.c:21:19: fatal error: json.h: ...

  7. 【caffe编译】 fatal error: hdf5.h: 没有那个文件或目录

    src/caffe/layers/hdf5_output_layer.cpp:3:18: fatal error: hdf5.h: 没有那个文件或目录 查找文件 locate hdf5.h 修改Mak ...

  8. 编译gd-2.0.35.tar.gz时报错:gd_png.c:16:53: error: png.h: No such file or directory

    编译gd-2.0.35.tar.gz时报错: gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/freetype/include/freetype2 -I/us ...

  9. Moses与IRSTLM共同编译失败的解决方案:fatal error: dictionary.h no such file or 目录

    已经解决: 错误原因在于始终没用又用已经编译安装过的irstlm而是一直用那个原文件夹造成的,而这里Manual似乎也写错了,manual里有很强的误导性:

随机推荐

  1. servlet生命周期深入理解

    什么是Servlet Java Servlet 是运行在 Web 服务器或应用服务器上的程序,它是作为来自 Web 浏览器或其他 HTTP 客户端的请求和 HTTP 服务器上的数据库或应用程序之间的中 ...

  2. 设置网站URL启动

    当新建一个MVC WEB程序 当你打开一个视图按F5运行 这时候并且不能政策运行会出现与个错误 无法找到资源. 这时候站点的默认设置是 把这个个默认设置更改成 红色框框的地方为修改点 你以为这样就完了 ...

  3. 《剑指offer》第十三题(机器人的运动范围)

    // 面试题:机器人的运动范围 // 题目:地上有一个m行n列的方格.一个机器人从坐标(0, 0)的格子开始移动,它 // 每一次可以向左.右.上.下移动一格,但不能进入行坐标和列坐标的数位之和 // ...

  4. YOLO V3论文理解

    YOLO3主要的改进有:调整了网络结构:利用多尺度特征进行对象检测:对象分类用Logistic取代了softmax. 1.Darknet-53 network在论文中虽然有给网络的图,但我还是简单说一 ...

  5. Flutter实战:手把手教你写Flutter Plugin

    前言 如果你对移动端有所关注,那么你一定会听说过Flutter.得益于Google,Flutter一经推出便得受到了广泛关注.很多开发者跃跃欲试,国内部分大厂,诸如美团.闲鱼等团队已经开始了Flutt ...

  6. mysql 将一张表里的数据插入到另一张表

    1. 表结构一样 insert into 表1 select * from 表2 2. 表结构不一样 insert into 表1 (列名1,列名2,列名3) select 列1,列2,列3 from ...

  7. English trip -- Review Unit7 Shopping 购物

    Xu言: 今天,lamb老师帮我梳理的时候到时提醒了我件事,之前Jade老师也说过每个单元的课程其实有个大主题,我需要把这个单元上完以后全部好好的回顾,然后整理一下.把每个单元的主题以及主题(them ...

  8. P4721 【模板】分治 FFT

    其实是分治ntt,因为fft会爆精度,真*裸题 分治过程和fft的一模一样,主要就是ntt精度高,用原根来代替fft中的\(w_n^k\) 1.定义:设m>1,(a,m)==1,满足\(a^r= ...

  9. python-day10--文件处理

    1.文件:是操作系统提供的概念 2. open(r+'文件路径' , '打开方式' , '用什么字符编码')   #r 表示原始字符串 eg:open(r'C:\Users\13264\Desktop ...

  10. git 下载代码

    git clone https://github.com/ContextLogic/Wish-Merchant-API.git wish(wish是下载的地址,这样的话,就在你的住文件夹上)