Error Message "which:command not found" Is Displayed When Installing the CANN Package in the CentOS 7.6 Container Image

Symptom

When the CANN package is installed in the CentOS 7.6 container image, the error message "which:command not found" is displayed. As a result, the installation stops.

Figure 1 Error message

Possible Causes

Some components in the CANN package depend on the Linux tool which, but it is not installed on CentOS 7.6 by default. As a result, the installation fails.

Solution

Run the following command to install which. After the installation is complete, run the command to install the CANN package.

1
yum install -y which