华为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简介与安装