CENTOS7 cannot find a valid baseurl for repo base

Source: Internet
Author: User

Today installs the Centosmini version under the virtual machine, the first thing after installation is Yum update

But there's a mistake: cannot find a valid baseurl for repo base base

Baidu has a half-day also not a very reliable, finally Google a bit, immediately came out.

The specific link here Http://unix.stackexchange.com/questions/22924/how-can-i-fix-cannot-find-a-valid-baseurl-for-repo-errors-on-centos

I am using one of the following:

cd/etc/sysconfig/network-scripts/

Then find the file that ifcfg begins with, open it up.

There are the following code in the first three lines, add the next two lines of DNS, keep and exit, and then continue to execute two ifdown and Ifup command, and then ping www.baodu.com Normal, there is no problem to update yum.

onboot=nonm_controlled=Nobootproto=dhcpDNS1=8.8.8.8DNS2 =4.2.2.2

Restart the network interface

Ifdown eth0ifup eth0

CENTOS7 cannot find a valid baseurl for repo base

Related Article

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.