OpenSUSE 15.4 切换国内软件源

本文将介绍怎样切换 OpenSUSE 15.4 的软件源为国内软件源。

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
人永远是要学习的。死的时候,才是毕业的时候。 —— 萧楚女
0 不喜欢
说说我的看法 -
全部评论(
没有评论
关于
本网站专注于 Java、数据库(MySQL、Oracle)、Linux、软件架构及大数据等多领域技术知识分享。涵盖丰富的原创与精选技术文章,助力技术传播与交流。无论是技术新手渴望入门,还是资深开发者寻求进阶,这里都能为您提供深度见解与实用经验,让复杂编码变得轻松易懂,携手共赴技术提升新高度。如有侵权,请来信告知:hxstrive@outlook.com
其他应用
公众号