---
title: CentOS 7.6容器镜像内安装CANN包报错“which:command not found”
description: "在CentOS 7.6容器镜像内安装CANN软件包的时候，报错“which:command not found”，导致安装中止。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/softwareinst/instg/instg_0073.html
sourcePath: /source/zh/canncommercial/900/softwareinst/instg/instg_0073.html
indexId: b9721bade3b5d1364a18e0b2e654e83f987aa036b31f408947de2293e29e1b0e64
---
# CentOS 7.6容器镜像内安装CANN包报错“which:command not found”

#### 问题描述

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

图1 报错截图


#### 可能原因

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


#### 解决措施

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

```
yum install -y which
```
