Checking the Source Validity
The installation requires the download of related dependencies. Ensure that the installation environment can be connected to the network. If your server cannot directly connect to the external network, you need to configure a network proxy. For details, see Configuring a System Network Proxy.
Checking the Source Validity (for Ubuntu and Similar Systems)
Run the following command as the root user to check whether the source is valid:
apt-get update
If an error is reported during command execution or dependency installation, check whether the network connection is normal, or replace the sources in the /etc/apt/sources.list file with valid ones or use mirrored ones.
You can access the source repository, and locate the directory corresponding to the onsite OS architecture and version. Open the source.list file, copy the source link in the file to the /etc/apt/sources.list file on the server, and run the apt-get update command.
If any of the below error messages is displayed when you run the apt-get update command, run the apt-get update --allow-unauthenticated command.
Err:1 https://repo.huaweicloud.com/docker-ce/linux/ubuntu focal InRelease Temporary failure resolving 'repo.huaweicloud.com' Err:2 https://mirrors.huaweicloud.com/ubuntu-ports focal InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Err:3 https://mirrors.huaweicloud.com/ubuntu-ports focal-updates InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Err:4 https://mirrors.huaweicloud.com/ubuntu-ports focal-security InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Err:5 https://mirrors.huaweicloud.com/docker-ce/linux/ubuntu focal InRelease Temporary failure resolving 'mirrors.huaweicloud.com' Reading package lists... Done N: Ignoring file 'index.html' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension W: Failed to fetch https://mirrors.huaweicloud.com/ubuntu-ports/dists/focal/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://mirrors.huaweicloud.com/ubuntu-ports/dists/focal-updates/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://mirrors.huaweicloud.com/ubuntu-ports/dists/focal-security/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://mirrors.huaweicloud.com/docker-ce/linux/ubuntu/dists/focal/InRelease Temporary failure resolving 'mirrors.huaweicloud.com' W: Failed to fetch https://repo.huaweicloud.com/docker-ce/linux/ubuntu/dists/focal/InRelease Temporary failure resolving 'repo.huaweicloud.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
Checking the Source Validity (for CentOS and Similar Systems)
Run the following command as the root user to check whether the source is valid:
yum makecache
If an error is reported during command execution or dependency installation, check whether the network connection is normal, or replace the source in the /etc/yum.repos.d/xxxx.repo file with an available source or use an image source.
If the message "Your license is invalid" is displayed after you run the preceding command, obtain the OS license.
You can access the source repository, and locate the directory corresponding to the onsite OS architecture and version. Open the source.repo file, copy the source link in the file to the /etc/yum.repos.d/ CentOS-Base.repo file on the server, and run the yum makecache command.
Checking Source Validity (for SLES Systems)
Run the following command as the root user to check whether the source is valid:
zypper ref
If an error is reported during command execution or during subsequent dependency installation, perform the following operations to configure the local source.
Perform the following steps as the root user:
- Mount the ISO file of the system image. (The following command is an example.)
mount -o loop SLE-12-SP5-Server-DVD-x86_64-GM-DVD1.iso /mnt
- Use the ar parameter to add a local source mounted to the mnt path and name it suse (user-defined).
zypper ar -f /mnt suse
- Clear the zypper cache and refresh the source for the configured source to take effect.
zypper clean zypper ref