Installing NetCDF-C
Procedure
- Use PuTTY to log in to the server as the root user.
- Create a NetCDF-C installation directory, for example, /path/to/NETCDF.
mkdir -p /path/to/NETCDF
- Install the dependency.
yum install curl* -y
- Go to the NetCDF-C installation directory.
cd /path/to/NETCDF
- Obtain the NetCDF-C installation package.
wget https://codeload.github.com/Unidata/netcdf-c/tar.gz/refs/tags/v4.7.3 --no-check-certificate
- Rename and decompress the NetCDF-C installation package.
mv v4.7.3 netcdf-c-4.7.3.tar.gz tar -zxvf netcdf-c-4.7.3.tar.gz
- Go to the directory generated after the decompression.
cd netcdf-c-4.7.3
- Perform the configuration.
./configure --prefix=/path/to/NETCDF --build=aarch64-unknown-linux-gnu --enable-shared --enable-netcdf-4 --enable-dap --with-pic --disable-doxygen --enable-static --enable-largefile CC=gcc CXX=g++ FC=gfortran F77=gfortran CPPFLAGS="-I/path/to/HDF5/include" LDFLAGS="-L/path/to/HDF5/lib -Wl,-rpath=/path/to/HDF5/lib " CFLAGS="- L/path/to/HDF5/lib -I/path/to/HDF5/include"

- Perform the compilation and installation.
make -j

make install

- Verify the installation.
ls /path/to/NETCDF/bin ls /path/to/NETCDF/lib
If the following information is displayed, the installation is successful:

- Load the environment variables.
export PATH=/path/to/NETCDF/bin:$PATH export LD_LIBRARY_PATH=/path/to/NETCDF/lib:$LD_LIBRARY_PATH
Parent topic: Configuring the Compilation Environment