YumRepo Error: All mirror URLs are not using问题解决
YumRepo Error: All mirror URLs are not using问题解决
(2013-01-24 02:55:57)
标签:
yumrepoerrormirror问题解决 |
分类:工作 |
今天帮同事搭建环境时碰到yum更新出问题了,报如下错误:
YumRepo Error: All mirror URLs are not using ftp, http[s] orfile.
Eg. $releasever is not a valid release or hasntbeen released yet/
removing mirrorlist with no valid mirrors:/var/cache/yum/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) forrepository: base. Please verify its path and try again
从字面意思是看是不能正确连接到http或是ftp的真实地址上。
1.有可能是防火墙阻碍了出网http请求或是ftp请求,请检查网关防火墙。
2.有可能是dns不对,无法正常解析,换成8.8.4.4
3.系统取不到Release号
我这里碰到真正的原因是就是3,系统读取不到Release号。
正常一般可以看到版本号
# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.2 (Final) Release: 6.2 Codename: Final |
但是同事的环境上确是,原因就不说了,又想骂人了,哎。
LSBVersion: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: n/a Description: n/a Release: n/a Codename: n/a |
而/etc/yum.repos.d下的*.repo源文件中都是baseurl都是带变量的
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
所以yum去尝试读取xml文件自然失败了。
# wget http://mirrors.163.com/centos/%releasever/os/x86_64/repodata/repomd.xml --2013-01-24 10:50:10-- http://mirrors.163.com/centos/%releasever/os/x86_64/repodata/repomd.xml Resolving mirrors.163.com... 123.58.173.89, 123.58.173.106 Connecting to mirrors.163.com|123.58.173.89|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2013-01-24 10:50:11 ERROR 404: Not Found. |
所以需要修改*.repo源文件中将$releasever变量全替换成6即可正常yum了。
cat/etc/yum.repos.d/CentOS6-Base-163.repo #released updates #additional packages that may be useful #additional packages that extend functionality of existingpackages #contrib - packages by Centos Users |
看看这次更新缓存就成功了。
# yum makecache base | 3.7kB 00:00 base/filelists_db | 5.9MB 00:04 base/primary_db | 4.5MB 00:03 base/other_db | 2.6MB 00:01 base/group_gz | 211kB 00:00 extras | 3.5kB 00:00 extras/filelists_db | 13kB 00:00 extras/prestodelta | 1.3kB 00:00 extras/primary_db | 23kB 00:00 extras/other_db | 7.9kB 00:00 updates | 3.5kB 00:00 updates/filelists_db | 3.6MB 00:02 updates/prestodelta | 642kB 00:00 updates/primary_db | 4.6MB 00:03 updates/other_db | 473kB 00:00 |
YumRepo Error: All mirror URLs are not using问题解决相关推荐
- YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. /HTML/ 标签: yum 2014-05-26
YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. </HTML>/ 标签: yum 2014-0 ...
- YumRepo Error: All mirror URLs are not using ftp, http[s] or file解决办法
一.问题背景 CentOS6.5利用yum命令安装程序报错YumRepo Error: All mirror URLs are not using ftp, http[s] or file.Eg. I ...
- YumRepo Error_ All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release_repo_arch co
一.背景 继 CentOS 8 停维后 CentOS 7 也将停止维护! CentOS 8 2021年底停止维护,CentOS 6 2020年底停止维护,CentOS 7 也已于 2020 年底结束整 ...
- Git 技术篇 - 同步代码到github失败,提示non-fast-forward、error: failed to push some refs to问题解决方法,git pull的用法
因为 github 上仓库里删过一些内容,导致本地的仓库和 github 里的对不上了. 此时用 git push 操作就会报 non-fast-forward,error: failed to pu ...
- MySql8.0.19最新版本创建用户分配权限演示,You have an error in your SQL syntax权限分配问题解决方法
MySql 8.0.19 权限分配 问题一:You have an error in your SQL syntax ---语法问题 问题二:You are not allowed to create ...
- Error(s) in loading state_dict for ResNet 问题解决
当使用如下命令加载模型的时候,会报错,没有一些 keys: model.load_state_dict(model_zoo.load_url(model_urls['resnet101'])) Run ...
- matlab libjli.so,error while loading shared libraries: libjli.so 问题解决
问题描述: 执行jar命令,javac命令执行报错 javac: error while loading shared libraries: libjli.so: cannot open shared ...
- `LINK : fatal error LNK1104: 无法打开文件“***.dll”`的问题解决
问题描述: 我在编译动态链接库的项目时候,就报了如下的错误: LINK : fatal error LNK1104: 无法打开文件"..\bin\InitProject.dll" ...
- cv2.error: OpenCV(4.5.4-dev) :-1: error: (-5:Bad argument) in function ‘putText‘问题解决
在python调用cv2.putText的时候报错,具体报错信息如下: Traceback (most recent call last): File "test.py", l ...
最新文章
- springboot添加swagger2组件
- cnpm安装webpack_Webpack(一)介绍
- 《深入浅出DPDK》读书笔记(四):并行计算-SIMD是Single-Instruction Multiple-Data(单指令多数据)
- Python Day42
- perl 操作 timesten 数据库 带用户名和密码验证
- 论文:Scalable and accurate deep learning for electronic health records研读笔记
- Windows Mobile 6 模拟器绿色中文版
- 数字信号处理概览与框图
- 最新腾讯防水墙滑块验证码破解,代码可以直接运行
- 【欣赏】一组唯美的图片
- nginx过滤HttpHeader的 中划线
- 华为云服务治理 | 隔离仓的作用
- mysql ssl 2026_解决连接到 Amazon RDS for MySQL 或 Aurora 实例时的 ERROR 2026 SSL 连接错误...
- 开源二维码QR CODE编码/解码(识别)库
- threejs 绘制球体_Three.js基础探寻四——立方体、平面与球体
- 新页面中返回到上次浏览的页面位置
- springboot+vue3物资管理系统实战
- box-shadow实现内部阴影
- Python中字符串和二进制互转
- react视频播放组件Griffith的基本使用