[Caffe] fatal error: hdf5.h: No such file or directory error solution

This error occurs when installing Caffe while compiling to source code if it is not in accordance with HDF5

sudo apt-get install libhdf5-dev

If an error is still reported after installation, open makefile.config, go to INCLUDE_DIRS and add /usr/include/hdf5/ Serial after it, as follows:

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

LIBRARY_DIRS, then add /usr/lib/ x86_64-Linux-gnu /hdf5/serial, as follows:

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

Re-execute make All.


Read More: