openSUSE配置软件源和多媒体解码器

转自 https://forum.suse.org.cn/t/topic/12342/2

首先打开终端进入管理员身份:

对于 openSUSE Leap 15.1:

第一步:输入 zypper mr -da 回车

第二步:依次输入以下命令分别回车:

sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/15.1/repo/oss 10 TUNA:15.1:OSS
sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/15.1/repo/non-oss TUNA:15.1:NON-OSS
sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/15.1/oss TUNA:15.1:UPDATE-OSS
sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/15.1/non-oss 1 TUNA:15.1:UPDATE-NON-OSS
sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/packman/suse/openSUSE_Leap_15.1/ 6 TUNA:15.1:PACKMAN

第三步:输入 zypper ref 回车后等待刷新软件源完成。

第四步:输入 zypper up 回车开始更新系统。

第五步:重启系统,在输入

zypper install --allow-vendor-change ffmpeg lame gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-plugins-ugly-orig-addon gstreamer-plugins-libav libavdevice56 libavdevice58 libdvdcss2 vlc-codecs

回车后确认安装按下 Y 即可开始。安装完后任何音乐和视频格式都可以播放了。

对于 openSUSE tumbleweed:

风滚草分支不需要修改软件源,但是要留神:如果使用 U 盘安装 openSUSE 风滚草,有可能默认情况下会把你的 U 盘作为软件仓库,要禁用。搜索 yast 管理器打开后进入:软件源,找到 u 盘 cdrom 那一行,把他禁用,再确定即可。其他的不要去改。接着添加 packman 国内源:

sudo zypper ar -fcg https://mirrors.tuna.tsinghua.edu.cn/packman/suse/openSUSE_Tumbleweed/  TUNA:PACKMAN

或者使用aliyun的源,速度可能会有所提升

sudo zypper ar -fcg https://mirrors.aliyun.com/packman/openSUSE_Tumbleweed/  aliyun:PACKMAN

接着 zypper ref 最后 zypper dup 即可开始更新系统。

更新完后也是一样:
zypper install --allow-vendor-change ffmpeg lame gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-plugins-ugly-orig-addon gstreamer-plugins-libav libavdevice56 libavdevice58 libdvdcss2 vlc-codecs

然后就可以看各种视频格式了。

因为风滚草特殊性,不要去执行 zypper up,而是 zypper dup 来更新,以免出现错误。
原文地址:https://www.cnblogs.com/rookieagle/p/13716011.html