Preparations for Installation
Configuring Source and Proxy
- Software package and Python installation require the installation of the system software package. Ensure that the installation environment can be connected to the network. For details about how to configure a network proxy, see Configuring a System Network Proxy. Run the following command as the root user to check whether the system software source is valid:
- CentOS/EulerOS
yum clean all yum makecache
If an error is reported during yum makecache command execution or dependency installation, check whether the network is connected, or replace the source in the /etc/yum.repos.d/xxx.repo file with an available source or use an image source.
- Ubuntu
apt-get update
If an error is reported during the command execution or the waiting time is too long or even an error is reported during the subsequent dependency installation, perform the following operations to rectify the fault:
- Check network communication.
- Replace the source in the /etc/apt/sources.list file with an available source or use an image source.
- Modify the proxy configuration of apt-get. The configuration method is as follows:
- Run the following command to edit the 80proxy file:
vi /etc/apt/apt.conf.d/80proxy
- Add the following content to the end of the file, save the file, and exit:
Acquire::http::Proxy "http://user:password@proxyserverip:port"; Acquire::https::Proxy "http://user:password@proxyserverip:port";
In the preceding commands, user indicates the username on the intranet, password indicates the user password, proxyserverip indicates the IP address of the proxy server, and port indicates the port number.
- Run the following command to edit the 80proxy file:
- CentOS/EulerOS
- The software package installation depends on the Python software package. To install the Python software package, you need to configure the pip source. For details, see Configuring the PIP Source.
Configuring Permissions for the Installation User
If a non-root user is used for installation, perform the operations described in this section. If the root user is used for installation, you only need to perform step 1.
Before installing the CANN software, you need to download the dependencies, which require sudo apt-get permission. Run the following commands as the root user:
- Run the following command to install sudo:
apt-get install sudo
- Open the /etc/sudoers file:
chmod u+w /etc/sudoers vi /etc/sudoers
- Add the following content under # User privilege specification of the file:
username ALL=(ALL:ALL) ALL
Replace username with the name of the common user who executes the installation script.
- Run the :wq! command to save the file.
- Run the following command to revoke the write permission on the /etc/sudoers file:
chmod u-w /etc/sudoers
- Ensure that the last line of the /etc/sudoers file is #includedir /etc/sudoers.d. Otherwise, add it manually.
- After the environment is installed using msInstaller, you can cancel the sudo permission.
Installing Dependencies
apt-get install libx11-xcb1 apt-get install libxcomposite1 apt-get install libatk1.0-0 apt-get install libatk-bridge2.0-0 apt-get install libgtk-3-0 apt-get install libnss3 apt-get install libgbm1 apt-get install libasound2 apt-get install libxcb-dri3-0