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

#### 操作步骤

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

```
yum install gmp-devel.aarch64 libudev* -y
```


3. 执行以下命令创建安装目录。

```
mkdir -p
/path/to/EXTRA
mkdir -p
/path/to/EXTRA
/mathlib
```


4. 执行以下命令解压libint安装包。

```
tar -xvf libint-2.6.0.tar.gz
```


5. 执行以下命令进入解压后的目录并进行配置。

```
cd libint-2.6.0
./autogen.sh
```


6. 执行以下命令创建并进入“build”目录。

```
mkdir build
cd build
```


7. 执行以下命令配置环境。

```
export LDFLAGS="-L
/path/to/GMP
/gmp-6.2/lib -L
/path/to/BOOST
/boost_1_72/lib"
export CPPFLAGS="-I/
path/to/BOOST
/boost_1_72/include/ -I/
path/to/GMP/
gmp-6.2/include"
```


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

```
..
/configure CXX=mpicxx --enable-eri=1 --enable-eri2=1 --enable-eri3=1 --with-max-am=4 --with-eri-max-am=4,3 --with-eri2-max-am=6,5 --with-eri3-max-am=6,5 --with-opt-am=3 --enable-generic-code --disable-unrolling --with-libint-exportdir=libint_cp2k_lmax4
```


9. 执行以下命令进行编译。

```
make export
```


10. 执行以下命令配置环境。

```
export LDFLAGS="-L
/path/to/GMP
/lib -L
/path/to/BOOST
/lib"
export CPPFLAGS="-I
/path/to/BOOST
/include/ -I
/path/to/GMP
/include"
```


11. 执行以下命令解压libint_cp2k_lmax4.tgz安装包。

```
tar -xvf libint-v2.6.0-cp2k-lmax-4.tgz
cd  libint-v2.6.0-cp2k-lmax-4
```


12. 执行以下命令进行编译配置。

```
./configure --prefix=
/path/to/EXTRA/LIBINT
CC=mpicc CXX=mpicxx
FC=mpifort --enable-fortran --enable-shared
```


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

```
make -j 32
make install
```
