---
title: GMP安装
description: 1. 使用PuTTY工具，以root用户登录服务器。
url: "https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/instg-osc/kunpenghpcenv_009.html"
---

# GMP安装

#### 操作步骤

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

```
tar -xvf gmp-6.1.0.tar.bz2
```


3. 执行以下命令进入GMP源码目录。

```
cd gmp-6.1.0
```


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

```
./configure --prefix=
/path/to/GMP
make
make install
```


5. 执行以下命令加载环境变量。

```
export LD_LIBRARY_PATH=
/path/to/GMP
/lib:$LD_LIBRARY_PATH
```
