---
title: GMP编译安装
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/instg-osc/kunpenggnu_006.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/instg-osc/kunpenggnu_006.html
indexId: 8e8fb920f12bef792037115c67093fa4c95f77f72bd60607510b39a81cbd226762
---
# GMP编译安装

#### 操作步骤

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

3. 执行以下命令进入解压文件路径。
  cd gmp-6.1.0/

4. 执行以下命令进行编译安装。
  ./configure --prefix=/path/to/GMP/gmp-6.1.0

  make

  make install

5. 执行以下命令加载环境变量。
  export LD_LIBRARY_PATH=/path/to/GMP/gmp-6.1.0/lib:$LD_LIBRARY_PATH

  编译安装成功如下图所示。
