tar -zxvf netcdf-c-4.8.1.tar.gz
cd netcdf-c-4.8.1
./configure --prefix=/path/to/NETCDF CPPFLAGS="-I/path/to/HDF5/include" LDFLAGS="-L/path/to/HDF5/lib -Wl,--build-id" --build=aarch64-unknown-linux-gnu --enable-fortran --enable-static=yes --enable-parallel --enable-shared CFLAGS="-O3 -fPIC -Wno-incompatible-pointer-types-discards-qualifiers -Wno-non-literal-conversion" FCFLAGS="-O3 -fPIC" --enable-fortran --enable-netcdf4 --enable-parallel CC=mpicc FC=mpif90 CXX=mpicxx
配置完后显示如图所示。
make make install
安装完成后如图所示。
export PATH=/path/to/NETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH export NETCDF=/path/to/NETCDF
nc-config --all
安装成功如图所示。