Yum command error reporting solution
Problem Description:
An error occurs when running the yum install gcc-c + + command on the VMware virtual machine
Error message:
could not retrieve mirrorlist http://mirrorlist.centos.org/release=6&arch=x86_64%repo=os error was 14: PYCURL ERROR 6 - "Counldn't resolve host 'mirrorlist.centos.org'"
Possible cause analysis:
1. DNS is not set
2. The connection mode of the network adapter is incorrect. The NAT mode is used locally and the bridge mode is used for the router
3. IP is not in the same network segment
4. The virtual machine service is not turned on
Solution:
1. Open the virtual machine — > Virtual machine settings — > Network adapter — > Network connection, set to bridge mode
2. Open ifcfg eno16777736 under etc/sysconfig/network scripts (the file name may be different), and set:
TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 UUID=4875d5bc-07e0-4951-8cd3-3fa7570c6201 ONBOOT=yes HWADDR=00:0C:29:12:7C:E7 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes
3. Open the resolv.conf file in the directory etc and set:
3.1 if the network cable is directly connected to the local route, make the following settings:
domain www.tendawifi.com [loacal DNS] search www.tendawifi.com [loacal DNS] nameserver 192.168.0.1 [loacal IP]
3.2 if WiFi is connected, set:
# this is google DNS nameserver 8.8.8.8 nameserver 8.8.4.4 # localhost DNS nameserver 168.192.1.1 [local default gateway] nameserver 168.192.1.101 [local IPv4 address] search localdomain [fixed, means search local DNS]
4. Restart the service, service network restart, Ping Google Ping www.google.com
Similar Posts:
- Description and temporary solution of VirtualBox 5.0. X unable to connect to Internet after installation
- CentOS ping www.google.com Error: name or service not know
- Mac VMware fusion private network shut down DHCP
- “ping: unknown host www.baidu.com “Problem solving
- All tap-windows6 adapters on this system are currently in use or disabled.
- Fix: err in Google Chrome_ TUNNEL_ CONNECTION_ Failed error
- Solution of docker error checking TLS connection
- Bringing up interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’. [FAILED]
- Linux: CentOS 7 executes service network restart error [Solved]
- The network of vagrant manual – public network