1. Error reporting
2. Reason for error
The system cannot parse the yum source for the following reasons
- The virtual machine cannot access the Internet! You need to check the network configuration to confirm that you can access the Internet and then look at the second situation
- Check if you can access the Internet: ping a public network pi
ping 114.114.114.114
- DNS configuration problem! Check if there is a problem with the DNS configuration. You can do this
nslookup www.baidu.com
& height=47 & amp;id=u28e350f7 & amp;name=image.png & amp;originHeight=47 & amp;originWidth=423 & amp;originalType=binary & amp;ratio=1 & amp;rotation=0 & amp; showTitle=true & amp;size=1379 & amp;status=done & amp;style=none & amp;taskId=u044e3be9-9662-4af3-8171-0bfbaa1d449 &title=parsing failed&width=423″ alt =”image.png” title=”parsing failed”>
- If the above two situations are normal, but the yum source still cannot be parsed, you can try another yum source
3. Solutions
- The network adapter of VMware can be set to NAT or bridge mode
- Create network card file
- Directory:
cd /etc/sysconfg/network-scripts/
- Check if there is:
ifcfg-ens33
orifcfg-ens32
, if there is no change file created (no suffix)
- Directory:
- Modify the content of the
ifcfg-ens33
/ifcfg-ens33
file, and open it for editing through the vim command
vim/vi ifcfg-ens33
bridge mode
TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="dhcp" #If it is bridge mode dhcp is automatically obtained, if it is NAT: static DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="ens33" UUID="784d0f02-9840-411b-afc1-9d65850bd9dd" DEVICE="ens33" ONBOOT="yes"
BOOTPROTO="dhcp"
#If it is a bridge modedhcp
is automatically obtained, if it is NAT:static
ONBOOT="yes"
ON
If it is NAT
mode, you need to add these
DNS1=8.8.8.8 DNS2=223.5.5.5 GATEWAY=192.168.1.2 # View your own parameters and finally configure 2 for forwarding NETMASK=255.255.255.0 IPADDR=192.168.1.180# View your own parameters
- IPADDR: The last three digits of IP + are randomly selected from 0 to 155
- GATEWAY: gateway
- DNS: DNS configuration (used to solve problem 2)
View parameters:
Input: ip a
- restart network service
systemctl restart network.service
- Enter the command to view the IP address:
ip a
This is my network card configuration (NTA mode)
Reference article: 1. https://blog.csdn.net/weixin_43232955/article/details/108290006
2. https://blog.csdn.net/qq_39720249/article/details/84065760