Each Answer to this Q is separated by one/two green lines.
I am having trouble when installing Caffe Deep Learning Framework on Python:
When I run
make command at caffe directory, it says
hdf5.h:no such directory
The steps I have done:
Update and upgrade my Ubuntu Server
Install Python 2.7
Having all of the dependencies base on http://caffe.berkeleyvision.org/install_apt.html
Run cp cp Makefile.config.example Makefile.config
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
What is the version of your Ubuntu install? Try this. In your
Makefile.config try to append
--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include +++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
hdf5_serial in the
--- 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.
This solution worked for me on the
sudo apt-get install libhdf5-10 sudo apt-get install libhdf5-serial-dev sudo apt-get install libhdf5-dev sudo apt-get install libhdf5-cpp-11 find /usr -iname "*hdf5.h*" /usr/include/hdf5/serial/hdf5.h export CPATH="/usr/include/hdf5/serial/"
Another case I’ve experienced with:
I was using Ubuntu 14.04 and installing hdf5-1.10.0.
hdf5.h was located in
/usr/local/hdf5/include. Thus, I modified
Makefile.config file by adding that location to
# Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include \ /usr/local/hdf5/include
I didn’t rename anything in
Makefile. It worked fine.
It did not work for me on Ubuntu16.04 LTS.
So I had to
sudo apt-get install libhdf5-10 sudo apt-get install libhdf5-serial-dev sudo apt-get install libhdf5-dev sudo apt-get install libhdf5-cpp-11 find /usr -iname "*hdf5.h*" /usr/include/hdf5/serial/hdf5.h
Now do this
On RHEL7, I got tired of hunting for specific
hdf5 RPMs and ran:
sudo yum install *hdf5*
and these are what I have:
hdf5-openmpi3-static-1.8.12-11.el7.x86_64 hdf5-1.8.12-11.el7.x86_64 hdf5-openmpi-static-1.8.12-11.el7.x86_64 hdf5-openmpi3-devel-1.8.12-11.el7.x86_64 hdf5-openmpi3-1.8.12-11.el7.x86_64 hdf5-mpich-devel-1.8.12-11.el7.x86_64 hdf5-devel-1.8.12-11.el7.x86_64 hdf5-openmpi-devel-1.8.12-11.el7.x86_64 hdf5-mpich-static-1.8.12-11.el7.x86_64 hdf5-mpich-1.8.12-11.el7.x86_64 hdf5-openmpi-1.8.12-11.el7.x86_64
Thanks to @loretoparisi, I was able to figure out where I had the header file I was missing and the problem went away.
$ find /usr -iname "*hdf5.h*" /usr/include/openmpi-x86_64/hdf5.h /usr/include/hdf5.h /usr/include/mpich-x86_64/hdf5.h /usr/include/openmpi3-x86_64/hdf5.h