All Products
Document Center

Alibaba Cloud Linux 2 system of classic network ECS instance cannot perform the yum command

Last Updated: Dec 15, 2020

Problem description

The ECS instances that meet the following conditions fail to run the yumupdate command, and an error message indicating that the repository address is invalid is returned.

  • Image: images of all versions and later.
  • Kernel: kernel-4.19.24-9.al7 and later versions.
  • Network: classic network.

Possible cause

Alibaba Cloud Linux 2 system classic network ECS instances that are not officially supported by Alibaba Cloud, you may not be able to connect to the addresses in the default YUM repository file.


Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.


To temporarily solve the problem, follow these steps:

  1. Log on to the destination ECS instance.
  2. Modify the snapshot configuration file. The modified content is as follows:
    Note: you must create the configuration file if it does not exist.
    [base] name=AliYun-$releasever - Base - baseurl=$releasever/os/$basearch/ gpgcheck=1 gpgkey=  #released updates [updates] name=AliYun-$releasever - Updates - baseurl=$releasever/updates/$basearch/ gpgcheck=1 gpgkey=  #additional packages that may be useful [extras] name=AliYun-$releasever - Extras - baseurl=$releasever/extras/$basearch/ gpgcheck=1 gpgkey=  # plus packages provided by Aliyun Linux dev team [plus] name=AliYun-$releasever - Plus - baseurl=$releasever/plus/$basearch/ gpgcheck=1 gpgkey=
  3. Delete other /etc/yum.repo configuration files under the . repo /directory, such as repository .

Solidification solution

Classic network ECS instance non-official Alibaba Cloud SDKs support the scenarios, we recommend that you change the network type of the ECS instance is a virtual private cloud (VPC), for more information, see remove permission from classic network to the VPC network.

Application scope

  • Elastic Compute Service