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

#### 操作步骤

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

```
cd
/path/to/PSI4
tar -xvf psi4-1.3.2.tar.gz
```


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

```
cd psi4-1.3.2
```


4. 执行以下命令编译。

```
mkdir build install
cmake -H. -B
/path/to/PSI4
/build -DCMAKE_INSTALL_PREFIX=
/path/to/PSI4
/install -Dpybind11_DIR=
/path/to/PYBIND11
/install/share/cmake/pybind11 -Dgau2grid_DIR=
/path/to/GAU2GRID
/install/share/cmake/gau2grid -DLibint_DIR=
/path/to/LIBINT
/install/share/cmake/Libint -DLibxc_DIR=
/path/to/LIBXC
/install/share/cmake/Libxc
```


5. 执行以下命令安装。

```
cd
/path/to/PSI4
/build
make -j
make install
```


6. 执行以下命令，查看生成的可执行文件。

```
ll
/path/to/PSI4
/install/bin
```

```
-rwxr-xr-x 1 root root 12139 Mar  9 10:47 psi4
```
