Yum Error Error:cannot find a valid baseurl for repo:base

Source: Internet
Author: User
Tags nameserver

Environment:

VMware Os:centos Release 6.5

Dual network card Eth0 (connected to the public network 192.168.80.0), Eth1 (connected intranet 192.168.44.0)

Error:

Using Yum to update software times error

Error:cannot find a valid baseurl for repo:base

There was no problem using Yum before, and Yum was unable to use it after restarting the virtual machine today. This error is caused by DNS resolution, check/etc/resolv.conf, DNS becomes 192.168.44.1, after manual modification, use yum Normal, restart the network after/etc/ Resolv.conf again back to 192.168.44.1,yum and can not use, in the network card configuration file Ifcfg-eth0 and ifcfg-eth1, add peerdns=no (do not modify resolv.conf file), restart the network card, everything is normal.

In summary, resolv.conf is the DNS client configuration file, the NameServer keyword defines the IP address of the DNS server, the file can contain many nameserver addresses, the name server in the order of occurrence in the file, from top to bottom to find, The second one is found when the first nameserver is invalid.

Yum Error Error:cannot find a valid baseurl for repo:base

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.