luarocks 安装hdf5的过程中 fatal error: hdf5.h: No such file or directory

 

https://ahmedibrahimvt.wordpress.com/2017/02/19/fatal-error-hdf5-h-no-such-file-or-directory/

First, you need to make sure the HDF5 packages are installed. If they are not installed, you can install them easily using
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


If it’s installed, then probably you need to provide the path to the compiler.
GCC looks in several different places for headers. On a normal Unix system, if you do not instruct it otherwise, it will look for headers requested with #include in:

/usr/local/include
libdir/gcc/target/version/include
/usr/target/include
/usr/include

You can find out the path of the hdf5.h using

find /usr -iname "*hdf5.h*"

usually you would find something like
/usr/include/hdf5/serial/hdf5.h

then you can just simply type
export CPATH="/usr/include/hdf5/serial/"

Make will be able to find hdf5.h now.

你可能感兴趣的:(luarocks 安装hdf5的过程中 fatal error: hdf5.h: No such file or directory)