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

# 安装spack

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令下载spack。

```
cd
/path/to
git clone https://github.com/spack/spack.git
```


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

```
source
/path/to
/spack/share/spack/setup-env.sh
```


4. 执行以下命令查看版本号。

```
spack -V
```


5. 执行以下命令让spack查找gcc7.3.0编译器。

```
spack compiler find
```


6. 执行以下命令查看已加载的编译器。

```
spack compilers
```
