华为openEuler 21.09创新版本系统,“sudo dnf update“更新报错,EPOL...

在华为openEuler21.09版本中,用户在尝试使用`sudodnfupdate`更新系统时遇到EPOL错误,原因是EPOL源的baseurl缺少路径文件'main/'。通过编辑/etc/yum.repos.d/openEuler.repo文件,将EPOL的baseurl添加'main/'路径,然后保存并重新执行更新命令,问题得以解决。
摘要由CSDN通过智能技术生成

华为open Euler 21.09创新版本系统,"sudo dnf update"更新报错,EPOL…

华为open Euler 21.09 :下载地址
需要安装可自行下载,这里对系统安装不做过多介绍,详情可了解其他博主文章OpenEuler简介与安装

遇到问题
当我们安装好系统,并配置好网络,准备跟新系统中的库和软件之类的话,我们在命令行键入命令 sudo dnf update

[yhzhu@localhost ~]$ sudo dnf update

会发现出现报错

[yhzhu@localhost ~]$ sudo dnf update
EPOL
Errors during downloading metadata for repository 'EPOL':
	-Status code: 404 for htpp://repo.openeuler.org/openEuler-21.09/EPOL/repomd.xml (IP: 159.138.xx.xxx)
Error: Failed to download metadata for repo 'EPOL': Cannot download repodata/repomd.xml: All mirrors werw tried
[yhzhu@localhost ~]$

然后我们尝试多种方法,包括重装,以及换源,但是换源不可取,因为要保持open Euler的完整性,尽量用系统提供的源。

然后我们在命令行键入sudo vi /etc/yum.repos.d/openEuler.repo

[yhzhu@localhost ~]$ sudo vi /etc/yum.repos.d/openEuler.repo

看到系统自带的源文件:

#generic-repos is licensed under the Mulan PSL v2.
#You can use this software according to the terms and conditions of the Mulan PSL v2.
#You may obtain a copy of Mulan PSL v2 at:
#    http://license.coscl.org.cn/MulanPSL2
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v2 for more details.

[OS]
name=OS
baseurl=http://repo.openeuler.org/openEuler-21.09/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/OS/$basearch/RPM-GPG-KEY-openEuler

[everything]
name=everything
baseurl=http://repo.openeuler.org/openEuler-21.09/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/everything/$basearch/RPM-GPG-KEY-openEuler

[EPOL]
name=EPOL
baseurl=http://repo.openeuler.org/openEuler-21.09/EPOL/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/OS/$basearch/RPM-GPG-KEY-openEuler

[debuginfo]
name=debuginfo
baseurl=http://repo.openeuler.org/openEuler-21.09/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/debuginfo/$basearch/RPM-GPG-KEY-openEuler

[source]
name=source
baseurl=http://repo.openeuler.org/openEuler-21.09/source/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/source/RPM-GPG-KEY-openEuler

[update]
name=update
baseurl=http://repo.openeuler.org/openEuler-21.09/update/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/OS/$basearch/RPM-GPG-KEY-openEuler

然后我们对比发现,在EPOL的栏中,baseurl后面的网址缺少了路径文件main/

[EPOL]
name=EPOL
baseurl=http://repo.openeuler.org/openEuler-21.09/EPOL/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-21.09/OS/$basearch/RPM-GPG-KEY-openEuler

在文件中将baseurl修改

baseurl=http://repo.openeuler.org/openEuler-21.09/EPOL/main/$basearch/

保存退出后,再次执行 sudo dnf update,即可进行更新!!


引用文档:
OpenEuler简介与安装

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值