(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
centos配置hdf5和netcdf的fortran环境
最新推荐文章于 2025-04-12 21:00:34 发布