1、首先禁用默认软件源
hxstrive@hxstrive:~> sudo zypper mr -da We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for root: Nothing to change for repository 'repo-backports-debug-update'. Repository 'repo-backports-update' has been successfully disabled. Nothing to change for repository 'repo-debug'. Nothing to change for repository 'repo-debug-non-oss'. Nothing to change for repository 'repo-debug-update'. Nothing to change for repository 'repo-debug-update-non-oss'. Repository 'repo-non-oss' has been successfully disabled. Repository 'repo-oss' has been successfully disabled. Nothing to change for repository 'repo-sle-debug-update'. Repository 'repo-sle-update' has been successfully disabled. Nothing to change for repository 'repo-source'. Repository 'repo-update' has been successfully disabled. Repository 'repo-update-non-oss' has been successfully disabled.
2、切换为阿里云软件源,如下:
hxstrive@hxstrive:~> sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/distribution/leap/15.2/repo/oss openSUSE-Aliyun-OSS hxstrive@hxstrive:~> sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/distribution/leap/15.2/repo/non-oss openSUSE-Aliyun-NON-OSS hxstrive@hxstrive:~> sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/update/leap/15.2/oss openSUSE-Aliyun-UPDATE-OSS hxstrive@hxstrive:~> sudo zypper ar -fc https://mirrors.aliyun.com/opensuse/update/leap/15.2/non-oss openSUSE-Aliyun-UPDATE-NON-OSS
3、更新软件源,如下:
hxstrive@hxstrive:~> sudo zypper ref Retrieving repository 'openSUSE-Aliyun-NON-OSS' metadata ............[done] Building repository 'openSUSE-Aliyun-NON-OSS' cache .................[done] Retrieving repository 'openSUSE-Aliyun-OSS' metadata --------------- Retrieving repository 'openSUSE-Aliyun-OSS' metadata --------------- Retrieving repository 'openSUSE-Aliyun-OSS' metadata ................[done] Building repository 'openSUSE-Aliyun-OSS' cache .....................[done] Retrieving repository 'openSUSE-Aliyun-UPDATE-NON-OSS' metadata .....[done] Building repository 'openSUSE-Aliyun-UPDATE-NON-OSS' cache ..........[done] Retrieving repository 'openSUSE-Aliyun-UPDATE-OSS' metadata .........[done] Building repository 'openSUSE-Aliyun-UPDATE-OSS' cache ..............[done] All repositories have been refreshed.
USTC mirros 中科大软件源:
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/distribution/leap/15.2/repo/oss USTC:15.2:OSS sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/distribution/leap/15.2/repo/non-oss USTC:15.2:NON-OSS sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/update/leap/15.2/oss USTC:15.2:UPDATE-OSS sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/update/leap/15.2/non-oss USTC:15.2:UPDATE-NON-OSS
pacman 清华大学 pacman 软件源:
sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/packman/suse/openSUSE_Leap_15.2/ TUNA:15.2:PACKMAN