Centos yum Error: Cannot find a valid baseurl for repo:

Source: Internet
Author: User
Tags echo command

Centos yum Error: Cannot find a valid baseurl for repo:

Centos yum Error: Cannot find a valid baseurl for repo: addons installs CentOS 6.5. When using yum, the following Error message is displayed.

[Root @ localhost ~] # Yum install lrzsz
Loaded plugins: fastestmirror
Determining fastest mirrors
Cocould not retrieve than list http://mirrorlist.centos.org /? Release = 6 & arch = x86_64 & repo = OS error was
14: pycurl error 6-"Couldn't resolve host 'using list .centos.org '"
Error: Cannot find a valid baseurl for repo: base

Ping mirrorlist.centos.org and the ping fails. It is suspected that it is a dns setting problem. Ping www.ctohome.com also causes the error of unknownhostwww.ctohome.com. If you try it again, the ping will occasionally fail, indicating that the dns is indeed faulty. So, let's modify the dns Configuration:

Vi/etc/resolv. conf

Khan, found that vi is not available. Install vi? Yum cannot be used, so yum cannot install vi (how to install vi/vim using yum in linux/centos systems ?). What should we do?

Think about it. In fact, we just need to modify the/etc/resolv. conf file and directly use a dns server. We thought of the echo command:

Echo "nameserver 8.8.8.8">/etc/resolv. conf

Ping www.baidu.com. yum can be used! The first thing is to delete the problematic dns server in/etc/resolv. conf.

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.