openEuler-20.03-LTS 更新出错
修改配置repo更新源
openEuler 与 华为云中的 EulerOS 不是同一个发行版本??
今天下载了华为的openEuler。装在电脑虚拟机里。
yum update 发现没有配置repo,于是想把Repo源换成华为的,按照 华为云操作 https://mirrors.huaweicloud.com/
在/etc/yum.repos.d目录下,创建文件EulerOS.repo,设置为
[base]
name=EulerOS-2.0SP5 base
baseurl=http://mirrors.huaweicloud.com/euler/2.5/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.huaweicloud.com/euler/2.5/os/RPM-GPG-KEY-EulerOS
然后update。显示出错:
[root@Euler ~]# yum update
Last metadata expiration check: 0:18:26 ago on 2020年04月14日 星期二 22时18分26秒
Error:
Problem 1: cannot install both perl-Compress-Raw-Zlib-1:2.061-4.x86_64 and perl
- package perl-IO-Compress-2.081-6.oe1.noarch requires perl(Compress::Raw::Zli
- cannot install the best update candidate for package perl-Compress-Raw-Zlib-
- problem with installed package perl-IO-Compress-2.081-6.oe1.noarch
Problem 2: package perl-Time-HiRes-4:1.9725-3.x86_64 requires perl(:MODULE_COMP
- cannot install both perl-4:5.16.3-285.h2.x86_64 and perl-4:5.28.0-434.oe1.x8
- cannot install both perl-4:5.16.3-285.h4.x86_64 and perl-4:5.28.0-434.oe1.x8
- cannot install both perl-4:5.16.3-285.h3.x86_64 and perl-4:5.28.0-434.oe1.x8
- cannot install the best update candidate for package perl-Time-HiRes-1.9760-
- problem with installed package perl-4:5.28.0-434.oe1.x86_64
Problem 3: package python-2.7.5-58.h13.x86_64 obsoletes python2 provided by pyt
- package python2-debug-2.7.16-15.oe1.x86_64 requires python2 = 2.7.16-15.oe1,
- cannot install the best update candidate for package python2-2.7.16-15.oe1.x
- problem with installed package python2-debug-2.7.16-15.oe1.x86_64
Problem 4: package qemu-img-10:1.5.3-156.5.h2.x86_64 requires libiscsi.so.2()(6
- cannot install both libiscsi-1.9.0-6.x86_64 and libiscsi-1.18.0-6.oe1.x86_64
- cannot install the best update candidate for package qemu-img-2:4.0.1-11.oe1
- problem with installed package libiscsi-1.18.0-6.oe1.x86_64
Problem 5: package python2-debug-2.7.16-15.oe1.x86_64 requires python2-devel =
- package python2-2.7.16-15.oe1.x86_64 requires libpython2.7_d.so.1.0()(64bit)
- package python-devel-2.7.5-58.h13.x86_64 obsoletes python2-devel provided by
- package python2-tkinter-2.7.16-15.oe1.x86_64 requires python2 = 2.7.16-15.oe
- cannot install the best update candidate for package python2-devel-2.7.16-15
- problem with installed package python2-tkinter-2.7.16-15.oe1.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or
如上面所示,update 总是出错。
然后换成 EulerOS-2.0SP3 base ,SP2,SP1 都是依然出错。
最后在 文档的 “系统安装”中找到一个 repo源 的链接:https://openeuler.org/zh/docs/20.03_LTS/docs/Releasenotes/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85.html
正确的repo源地址是:http://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/
/etc/yum.repos.d/EulerOS.repo 配置为:
[base]
name=openEuler-20.03-LTS base
baseurl=https://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-20.03-LTS/OS/x86_64/RPM-GPG-KEY-openEuler
之后再次update成功!
yum clean all
yum makecache
yum update
openEuler-20.03-LTS base 36 kB/s | 2.7 MB 01:18
Last metadata expiration check: 0:00:56 ago on 2020年04月14日 星期二 23时17分46秒.
Dependencies resolved.
Nothing to do.
Complete!
原因在于: openEuler 与 华为云中的 EulerOS 是两个不同的发行版本!!!