---
title: CentOS 7.6容器镜像内安装CANN包报错“which:command not found”-昇腾社区
description: 在CentOS 7.6容器镜像内安装CANN软件包的时候，报错“which:command not found”，导致安装中止。
keywords: which
url: https://www.hiascend.com/document/caselibrary/detail/canncase_0015
section: (其他)
---

# CentOS 7.6容器镜像内安装CANN包报错“which:command not found”-昇腾社区

URL: https://www.hiascend.com/document/caselibrary/detail/canncase_0015
描述: 在CentOS 7.6容器镜像内安装CANN软件包的时候，报错“which:command not found”，导致安装中止。
关键词: which

昇腾文档 [了解详情](https://www.hiascend.com/document)

故障案例 [了解详情](https://www.hiascend.com/document/caselibrary)

CentOS 7.6容器镜像内安装CANN包报错“which:command not found”

CentOS 7.6容器镜像内安装CANN包报错“which:command not found”

2025/06/03

464

问题信息

| 问题来源 | 产品大类 | 产品子类 | 关键字 |
| --- | --- | --- | ---|
| 官方 | 安装部署 | CANN | which |

#### 问题现象描述

在CentOS 7.6容器镜像内安装CANN软件包的时候，报错“which:command not found”，导致安装中止。

图1报错截图

#### 原因分析

CANN 软件包中部分组件依赖Linux工具which进行安装，但CentOS 7.6上默认未安装which，导致安装失败。

#### 解决措施

执行如下命令，安装which，安装完成后继续执行CANN软件包的安装命令。

```
yum install -y which
```

本页内容

- 问题信息
- 问题现象描述
- 原因分析
- 解决措施
