Caffe编译时看不到hdf5.h [英] Caffe didn't see hdf5.h when compiling

查看:142
本文介绍了Caffe编译时看不到hdf5.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Python上安装Caffe深度学习框架时遇到麻烦:

I am having trouble when installing Caffe Deep Learning Framework on Python:

在以下位置运行 make 命令时caffe目录,它说

When I run make command at caffe directory, it says


hdf5.h:没有这样的目录

hdf5.h:no such directory

我已完成的步骤:


  • 更新和升级我的Ubuntu Server

  • Update and upgrade my Ubuntu Server

安装Python 2.7

Install Python 2.7

所有依赖项均基于 http://caffe.berkeleyvision.org/install_apt.html

运行cp cp Makefile.config.example Makefile.config

Run cp cp Makefile.config.example Makefile.config

在Makefile.config中取消注释cpu_only = 1

Uncomment cpu_only = 1 in Makefile.config

如果有人可以帮助我,我将不胜感激。

I will be grateful if someone can help me.

错误消息:

CXX src/caffe/util/hdf5.cpp
in file include from src/caffe/util/hdf5.cpp:1:0:
./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory
compilation terminated 

Makefile:572 recipe for target '.build_release/src/caffe/util/hdf5.o'       
failed Make:*** [.build_release/src/caffe/util/hdf5.o] Error 1


推荐答案

您的Ubuntu安装版本是什么?尝试这个。在您的 Makefile.config 中,尝试将 / usr / include / hdf5 / serial / 附加到 INCLUDE_DIRS

What is the version of your Ubuntu install? Try this. In your Makefile.config try to append /usr/include/hdf5/serial/ to INCLUDE_DIRS:

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

并将 hdf5_hl hdf5 重命名为 hdf5_serial_hl Makefile 中的$ c>和 hdf5_serial

and rename hdf5_hl and hdf5 to hdf5_serial_hl and hdf5_serial in the Makefile:

--- 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

有关错误修复的更多信息此处

More about the bug fix here.

这篇关于Caffe编译时看不到hdf5.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆