caffe deep learning [three] compilation error: fatal error: hdf5.h: No such file or directory compilation terminated.

Question:
When configuring Caffe-SSD today, I was ready to compile Caffe when I encountered:

fatal error: hdf5.h: No such file or directory compilation terminated.

Such problems are shown in the following figure:

The reason is that the header file for HDF5.h was not found.
 
 
 
 
 
 
Solutions:
1. Modify makefile.config file
Go to the download directory for Caffe
In the makefile.config file, hold down CRTL + F to search: INCLUDE_DIRS
Note that it’s not makefile.config. example!!
Add/usr/include/hdf5/serial/to INCLUDE_DIRS
Namely, the original:

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

Now it’s:

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

 
 
2. Modify the Makefile file
In the Makefile file, press and hold CRTL + F to search: LIBRARIES +=
Note that this is not the makefile.config from step 1 above!!
Change HDF5_HL and HDF5 to HDF5_SERIal_HL and HDF5_serial.
Namely, the original:

LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5

Now it’s:

LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

 
 
 
 
Results:

 
 
 


Read More: