---
title: 安装NETCDF-C
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengabinit_02_0008.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengabinit_02_0008.html
indexId: 0cec79812859973c0a208d2e850f1409da4f3e1ca14b36f7f59d088b62c99eef68
---
# 安装NETCDF-C

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令解压NETCDF-C安装包。

```
tar -zxvf netcdf-c-4.7.0.tar.gz
```


3. 执行以下命令进入解压后的目录。

```
cd netcdf-c-4.7.0
```


4. 执行以下命令进行配置。

```
./configure --prefix=
/path/to/NETCDF
--build=aarch64-linux --enable-fortran --disable-static --enable-shared --with-pic --enable-parallel-tests --enable-pnetcdf --enable-large-file-tests --enable-largefile
```


5. 执行以下命令进行编译安装。

```
make -j
make install
```


6. 执行以下命令设置NETCDF-C的环境变量。

```
export PATH=
/path/to/NETCDF
/bin:$PATH
export LD_LIBRARY_PATH=
/path/to/NETCDF
/lib:$LD_LIBRARY_PATH
```
