当尝试在 Debian 系统上安装 h4toh5 时,使用:
./configure CC=/usr/bin/h4cc --with-hdf5=/usr/include/hdf5/serial
我有错误,例如:
checking for hdf5.h... no
configure: error: cannot find HDF5 header files!
安装说明指出需要指定 HDF5 库的位置:
HDF5 Library (--with-hdf5=)
The location of HDF5 Library should be specified.
事实上,我不太明白“HDF5库的位置”是什么意思......,
有人可以通过参考“dpkg -L libhdf5-dev”命令的输出(如下所示)来回答吗?
首先,我安装了 libhdf5-dev 库。
cyue@LGGE130:~/Downloads/h4h5tools-2.2.2$ dpkg -l | grep hdf5
ii hdf5-helpers 1.8.13+docs-15 amd64 Hierarchical Data Format 5 (HDF5) - Helper tools
ii libhdf5-8:amd64 1.8.13+docs-15 amd64 Hierarchical Data Format 5 (HDF5) - runtime files - serial version
ii libhdf5-cpp-8:amd64 1.8.13+docs-15 amd64 Hierarchical Data Format 5 (HDF5) - C++ libraries
ii libhdf5-dev 1.8.13+docs-15 amd64 Hierarchical Data Format 5 (HDF5) - development files - serial version
以下命令返回:
cyue@LGGE130:~/Downloads/h4h5tools-2.2.2$ dpkg -L libhdf5-dev
/.
/usr
/usr/share
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/libhdf5-dev
/usr/share/doc
/usr/share/doc/libhdf5-dev
/usr/share/doc/libhdf5-dev/changelog.Debian.gz
/usr/share/doc/libhdf5-dev/changelog.gz
/usr/share/doc/libhdf5-dev/copyright
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/hdf5
/usr/lib/x86_64-linux-gnu/hdf5/serial
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial.a
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.a
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial.settings
/usr/include
/usr/include/hdf5
/usr/include/hdf5/serial
/usr/include/hdf5/serial/h5tb.mod
/usr/include/hdf5/serial/h5lt.mod
/usr/include/hdf5/serial/h5im.mod
/usr/include/hdf5/serial/h5ds.mod
/usr/include/hdf5/serial/H5f90i.h
/usr/include/hdf5/serial/H5f90i_gen.h
/usr/include/hdf5/serial/H5VarLenType.h
/usr/include/hdf5/serial/H5ArrayType.h
/usr/include/hdf5/serial/H5CppDoc.h
/usr/include/hdf5/serial/H5StrType.h
/usr/include/hdf5/serial/H5PropList.h
/usr/include/hdf5/serial/H5PredType.h
/usr/include/hdf5/serial/H5Object.h
/usr/include/hdf5/serial/H5Location.h
/usr/include/hdf5/serial/H5Library.h
/usr/include/hdf5/serial/H5IntType.h
/usr/include/hdf5/serial/H5Include.h
/usr/include/hdf5/serial/H5IdComponent.h
/usr/include/hdf5/serial/H5Group.h
/usr/include/hdf5/serial/H5FloatType.h
/usr/include/hdf5/serial/H5File.h
/usr/include/hdf5/serial/H5FcreatProp.h
/usr/include/hdf5/serial/H5FaccProp.h
/usr/include/hdf5/serial/H5Exception.h
/usr/include/hdf5/serial/H5EnumType.h
/usr/include/hdf5/serial/H5DxferProp.h
/usr/include/hdf5/serial/H5DcreatProp.h
/usr/include/hdf5/serial/H5DataType.h
/usr/include/hdf5/serial/H5DataSpace.h
/usr/include/hdf5/serial/H5DataSet.h
/usr/include/hdf5/serial/H5CompType.h
/usr/include/hdf5/serial/H5CommonFG.h
/usr/include/hdf5/serial/H5Classes.h
/usr/include/hdf5/serial/H5Attribute.h
/usr/include/hdf5/serial/H5AtomType.h
/usr/include/hdf5/serial/H5AbstractDs.h
/usr/include/hdf5/serial/H5Cpp.h
/usr/include/hdf5/serial/H5PacketTable.h
/usr/include/hdf5/serial/H5PTpublic.h
/usr/include/hdf5/serial/H5DSpublic.h
/usr/include/hdf5/serial/H5TBpublic.h
/usr/include/hdf5/serial/H5LTpublic.h
/usr/include/hdf5/serial/H5IMpublic.h
/usr/include/hdf5/serial/H5DOpublic.h
/usr/include/hdf5/serial/hdf5_hl.h
/usr/include/hdf5/serial/hdf5.mod
/usr/include/hdf5/serial/h5z.mod
/usr/include/hdf5/serial/h5test_kind_sizeof_mod.mod
/usr/include/hdf5/serial/h5t_provisional.mod
/usr/include/hdf5/serial/h5t.mod
/usr/include/hdf5/serial/h5s.mod
/usr/include/hdf5/serial/h5r_provisional.mod
/usr/include/hdf5/serial/h5r.mod
/usr/include/hdf5/serial/h5p_provisional.mod
/usr/include/hdf5/serial/h5p.mod
/usr/include/hdf5/serial/h5o_provisional.mod
/usr/include/hdf5/serial/h5o.mod
/usr/include/hdf5/serial/h5lib_provisional.mod
/usr/include/hdf5/serial/h5lib.mod
/usr/include/hdf5/serial/h5l_provisional.mod
/usr/include/hdf5/serial/h5l.mod
/usr/include/hdf5/serial/h5i.mod
/usr/include/hdf5/serial/h5global.mod
/usr/include/hdf5/serial/h5g.mod
/usr/include/hdf5/serial/h5fortran_types.mod
/usr/include/hdf5/serial/h5f_provisional.mod
/usr/include/hdf5/serial/h5f.mod
/usr/include/hdf5/serial/h5e_provisional.mod
/usr/include/hdf5/serial/h5e.mod
/usr/include/hdf5/serial/h5d_provisional.mod
/usr/include/hdf5/serial/h5d.mod
/usr/include/hdf5/serial/h5a_provisional.mod
/usr/include/hdf5/serial/h5a.mod
/usr/include/hdf5/serial/h5_dble_interface.mod
/usr/include/hdf5/serial/H5Zpublic.h
/usr/include/hdf5/serial/H5Tpublic.h
/usr/include/hdf5/serial/H5Spublic.h
/usr/include/hdf5/serial/H5Rpublic.h
/usr/include/hdf5/serial/H5PLextern.h
/usr/include/hdf5/serial/H5Ppublic.h
/usr/include/hdf5/serial/H5Opublic.h
/usr/include/hdf5/serial/H5MMpublic.h
/usr/include/hdf5/serial/H5Lpublic.h
/usr/include/hdf5/serial/H5Ipublic.h
/usr/include/hdf5/serial/H5Gpublic.h
/usr/include/hdf5/serial/H5FDstdio.h
/usr/include/hdf5/serial/H5FDsec2.h
/usr/include/hdf5/serial/H5FDmulti.h
/usr/include/hdf5/serial/H5FDmpio.h
/usr/include/hdf5/serial/H5FDmpi.h
/usr/include/hdf5/serial/H5FDlog.h
/usr/include/hdf5/serial/H5FDfamily.h
/usr/include/hdf5/serial/H5FDdirect.h
/usr/include/hdf5/serial/H5FDcore.h
/usr/include/hdf5/serial/H5FDpublic.h
/usr/include/hdf5/serial/H5Fpublic.h
/usr/include/hdf5/serial/H5Epublic.h
/usr/include/hdf5/serial/H5Epubgen.h
/usr/include/hdf5/serial/H5Dpublic.h
/usr/include/hdf5/serial/H5Cpublic.h
/usr/include/hdf5/serial/H5ACpublic.h
/usr/include/hdf5/serial/H5Apublic.h
/usr/include/hdf5/serial/H5version.h
/usr/include/hdf5/serial/H5public.h
/usr/include/hdf5/serial/H5pubconf.h
/usr/include/hdf5/serial/H5overflow.h
/usr/include/hdf5/serial/H5api_adpt.h
/usr/include/hdf5/serial/hdf5.h
/usr/share/doc/libhdf5-dev/RELEASE.txt.gz
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/include
/usr/lib/x86_64-linux-gnu/hdf5/serial/lib
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.settings
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so
请注意,我确实有 /usr/include/hdf5/serial/hdf5.h 文件,所以我不知道发生了什么(考虑到我的 Linux 软件安装的初级水平......)。 config.log中的相关信息是:
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <hdf5.h>
configure:4580: result: no
configure:4580: checking hdf5.h presence
configure:4580: /usr/bin/h4cc -E -I/usr/include/hdf5/serial//include conftest.c
conftest.c:12:18: fatal error: hdf5.h: No such file or directory
#include <hdf5.h>
^
compilation terminated.
configure:4580: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "H4H5Tools"
| #define PACKAGE_TARNAME "h4h5tools"
| #define PACKAGE_VERSION "2.2.2"
| #define PACKAGE_STRING "H4H5Tools 2.2.2"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "h4h5tools"
| #define VERSION "2.2.2"
| #define STDC_HEADERS 1
| /* end confdefs.h. */
| #include <hdf5.h>
configure:4580: result: no
configure:4580: checking for hdf5.h
configure:4580: result: no
configure:4587: error: cannot find HDF5 header files!