安装 hdf5 时出现 hdf5.h 错误(使用 luarocks)

我正在使用 luarocks 命令为 lua 安装 hdf5,

luarocks --local install hdf5

然后出现了一个错误;

make[1]: 进入目录 '/tmp/luarocks_hdf5-2.0.0-1-g0RmEe/lua-hdf5/hdf5'
从命令行中输入文件:0:0:
/usr/include/stdc-predef.h:63:1: 严重错误: H5pubconf.h: 没有那个文件或目录
 #endif
 ^
编译结束。
gcc -E -o C.i -I/tmp/luarocks_hdf5-2.0.0-1-g0RmEe/lua-hdf5/hdf5/../gcc-lua-cdecl/ffi-cdecl C.c
C.c:11:18: 严重错误: hdf5.h: 没有那个文件或目录
 #include <hdf5.h>
                  ^
编译结束。
Makefile:33: target 'C.i' failed的规则失败
make[1]: *** [C.i] 错误 1
make[1]: 离开目录 '/tmp/luarocks_hdf5-2.0.0-1-g0RmEe/lua-hdf5/hdf5'
Makefile:44: target 'hdf5' failed的规则失败
make: *** [hdf5] 错误 2

错误: 构建错误: 构建失败。

我正在使用 lua 5.3luarocks 3.2.0,并在 ubuntu 18.04 系统上使用 gcc-4.8 编译器。

有没有人能帮忙解决一下?

点赞