step1:在 /etc/yum.repos.d/ 路径下创建一个新的*.repo文件
sudo vim /etc/yum.repos.d/my_source.repo
step2:复制以下内容(我自己对照原始的源和华为源测试过的)并:wq保存退出:
[openEuler_OS]
name=openEuler_OS
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-23.09/OS/x86_64/
metalink=https://repo.huaweicloud.com/openeuler/metalink?repo=$releasever/OS&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-23.09/OS/x86_64/RPM-GPG-KEY-openEuler
[openEuler-everything]
name=openEuler-everything
baseurl=http://repo.huaweicloud.com/openeuler/openEuler-23.09/everything/x86_64/
enabled=1
gpgcheck=0
gpgkey=http://repo.huaweicloud.com/openeuler/openEuler-23.09/everything/x86_64/RPM-GPG-KEY-openEuler
[openEuler-EPOL]
name=openEuler-epol
baseurl=http://repo.huaweicloud.com/openeuler/openEuler-23.09/EPOL/main/x86_64/
enabled=1
gpgcheck=0
[debuginfo]
name=debuginfo
baseurl=http://repo.huaweicloud.com/openeuler/openEuler-23.09/debuginfo/$basearch/
metalink=https://repo.huaweicloud.com/openeuler/metalink?repo=$releasever/debuginfo&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=0
[source]
name=source
baseurl=http://repo.huaweicloud.com/openeuler/openEuler-23.09/source/
metalink=https://repo.huaweicloud.com/openeuler/metalink?repo=$releasever&arch=source
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.huaweicloud.com/openeuler/openEuler-23.09/source/RPM-GPG-KEY-openEuler
[openEuler-update]
name=openEuler-update
baseurl=http://repo.huaweicloud.com/openeuler/openEuler-23.09/update/x86_64/
enabled=1
gpgcheck=0
[update-source]
name=update-source
baseurl=http://repo.huaweicloud.com/openeuler/openEuler-23.09/update/source/
metalink=http://repo.huaweicloud.com/openeuler/metalink?repo=$releasever/update&arch=source
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.huaweicloud.com/openeuler/openEuler-23.09/source/RPM-GPG-KEY-openEuler
step3:转移备份原有openEuler的源到 /home/路径下:
sudo mv /etc/yum.repos.d/openEuler.repo /home/openEuler_backup.repo
step4:清除yum缓存:
yum clean all
step5:重建yum缓存:
yum makecache
ok 不出问题的话就更换好了,openEuler的资料比较少,请多多收藏点赞让更多人看到