yum出错Error: Cannot find a valid baseurl for repo: base
Posted 南无
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了yum出错Error: Cannot find a valid baseurl for repo: base相关的知识,希望对你有一定的参考价值。
最近在安装MySQL的rpm包时,出现了一个问题,
当使用命令:
vim ./resolv.conf
时出现以下错误:
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 6 - "Couldn‘t resolve host ‘mirrorlist.centos.org‘"
Error: Cannot find a valid baseurl for repo: base
解决方法如下(修改dns配置)
vi /etc/resolv.conf
在此文件最后加入:nameserver 8.8.8.8
如果没有vi编辑器可用:
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
然后ping www.baidu.com
可以ping通,不会再出现unknow host
ok,安装依赖,
yum install ld-linux.so.2
最后出现compelete即可
以上是关于yum出错Error: Cannot find a valid baseurl for repo: base的主要内容,如果未能解决你的问题,请参考以下文章
yum 报错 Error: Cannot find a valid baseurl for repo: base
yum命令出现“Error: Cannot find a valid baseurl for repo: base”解决办法
Centos中执行yum update或yum install 时报Error: Cannot find a valid baseurl for repo: base错误
Webpack打包出错:Error: Cannot find module ‘webpack/lib/node/NodeTemplatePlugin‘ Require stack:
configure: error: Cannot find ldap libraries in /usr/lib
Linux yum出错 Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please ver