(1)Build zlib
$ sudo ./configure --prefix=/usr/local/netcdf4
$ make
$ make check
$ sudo make install
(2)Build HDF5
Then you build HDF5, specifying the location of the zlib library:
$sudo ./configure --with-zlib=/usr/local/netcdf4 --prefix=/usr/local/netcdf4
$sudo make
$sudo make check
$sudo make install
(3)build curl
$sudo ./configure --with-zlib=/usr/local/netcdf4 --prefix=/usr/local/netcdf4
$ make
$ make check
$ sudo make install
(4)Build netcdf4.4.1.1
After HDF5 is done, build netcdf-c, specifying the location of the HDF5, zlib, and (if built into HDF5) the curl header files and libraries in the CPPFLAGS and LDFLAGS environment variables.
$ CPPFLAGS=-I/usr/local/netcdf4/include LDFLAGS=-L/usr/local/netcdf4/lib ./configure --prefix=/usr/local/netcdf4
$sudo apt-get install m4 (如果提示没有m4的话,否则可以不执行)
$ make
$ make check
$ s
centos配置hdf5和netcdf的fortran环境
最新推荐文章于 2025-10-22 15:46:07 发布
本文档详细介绍了在CentOS系统中如何构建和安装zlib、HDF5、curl以及netcdf-c和netcdf-fortran库的步骤,确保Fortran环境下的HDF5和NetCDF支持。安装过程包括设置环境变量以确保依赖项正确链接。

最低0.47元/天 解锁文章
3181

被折叠的 条评论
为什么被折叠?



