Tag Archives: vmware

Solve the problem of could not retrieve mirrorlist in centos7 yum

Just after installing CentOS 7. X through VMware 12, check the IP address of CentOS LAN using IP addr. It is found that there is no error when using Yum to install some toolkits

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was

14: PYCURL ERROR 6 – “Couldn’t resolve host ‘ mirrorlist.centos.org ‘”

Error: Cannot find a valid baseurl for repo: base

The image list cannot be retrieved using yum. The solution is as follows.

1. CD/etc/sysconfig/network scripts enter this folder, and then check if there is ifcfg-ens33, sometimes ifcfg-eth0

2. VI ifcfg-ens33 enter the general mode of VI and move the cursor to onboot = No

3. Press “I” to enter the editing mode of VI, and change no to yes

4. After modification, press ESC to enter the general mode again, then press “:” to the bottom of the file, and then enter “WQ” (save to exit) after “:”

5. Restart CentOS and try IP addr and Yum again.

Add: if ifcfg-eth0 file is found in network scripts, change the following two items to the following, and finally restart.

ONBOOT=yes MM_ CONTROLLED=no

has a problem. The official account below is

.