手动配置软件源(以 openSUSE Leap 为例,添加科大、清华源)(参考http://mirrors.ustc.edu.cn/help/opensuse.html)
注意
以下配置方法适用于从未自行配置软件源的用户,其他用户请根据具体情况自行配置,以下仅供参考。
确认当前配置的软件源:
sudo zypper lr -d
禁用原有软件源:
sudo zypper mr -da
添加镜像源(科大源):
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/distribution/leap/$releasever/repo/oss USTC:OSS
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/distribution/leap/$releasever/repo/non-oss USTC:NON-OSS
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/update/leap/$releasever/oss USTC:UPDATE-OSS
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/update/leap/$releasever/non-oss USTC:UPDATE-NON-OSS
对于 15.3 或更高版本的 openSUSE Leap,还需添加 SLE 更新源和 Backports 更新源
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/update/leap/$releasever/sle USTC:UPDATE-SLE
sudo zypper ar -fcg https://mirrors.ustc.edu.cn/opensuse/update/leap/$releasever/backports USTC:UPDATE-BACKPORTS
命令中最后一个参数为每一个源指定了一个 alias(别称),可以根据个人喜好更改。
手动刷新软件源:
sudo zypper ref
图形界面下配置方法(以 openSUSE Leap 15.3 为例):
打开 YaST;
点击 Software 分组中的 Software Repositories;
在打开的窗口上方的列表中点击 Main Repository,点击 Edit;
将 download.opensuse.org 替换为 mirrors.ustc.edu.cn/opensuse,点 OK;
再用同样的方法编辑 Non-OSS Repository, Main Update Repository, Update Repository (Non-Oss), Update repository with updates from SUSE Linux Enterprise 15 和 Update repository of openSUSE Backports。
添加镜像源(清华源):
sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/$releasever/repo/oss/' mirror-oss
sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/$releasever/repo/non-oss/' mirror-non-oss
sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/oss/' mirror-update
sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/non-oss/' mirror-update-non-oss
Leap 15.3 用户还需添加 sle 和 backports 源:
sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/sle/' mirror-sle-update
sudo zypper ar -cfg 'https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/$releasever/backports/' mirror-backports-update
视频解码器(含flash-player要添加相应的软件源)
sudo zypper ar -cfp 90 http://mirrors.aliyun.com//packman/suse/openSUSE_Leap_15.5 Packman
在opensuse15.4leap中安装许多解码器让火狐浏览器firefox播放网页视频
实际难题:
在opensuse15.2和15.3leap中安装flash-player、ffmpeg-4、gstreamer-plugins和vlc-codecs就能让火狐浏览器firefox播放酷狗、网易云音乐、优酷、哔哩哔哩网站的视频,但在opensuse15.4却是不能播放视频,提示:“没有找到支持的视频格式和MIME类型”
系统opensuse15.4leap自带火狐浏览器firefox版本是91.8.0esr (64 位)
参考文章:
《由于版权保护,你需要自己为浏览器安装多媒体解码器。详见:解码器》
https://zh.opensuse.org/解码器
《多媒体编解码器——来自中国科学技术大学ustc的opensuse非官方指南》
https://opensuse-guide.ustclug.org/codecs.php
localhost:~ #sudo zypper addrepo -cfg ‘https://mirrors.tuna.tsinghua.edu.cn/packman/suse/openSUSE_Leap_15.4/’ packman(参考上边添加软件源)
localhost:~ #sudo zypper repos
由 guoyunhe 开发的 opi (Open Build Service Package Installer) 可以在 Leap 和 Tumbleweed 上快速安装解码器。
localhost:~ # sudo zypper install opi
localhost:~ # sudo opi codecs
Do you want to install codecs from Packman repository? (Y/n) Y 输入大写字母Y再按回车键
自动安装50个解码器软件包,就能播放酷狗、网易云音乐、优酷、哔哩哔哩网站的视频,让我很奇怪的地方是它竟会连带安装网易云音乐客户端
这步不用了//安装编解码 H.264 视频的 OpenH264解码器
这步不用了///localhost:~ #sudo zypper addrepo http://codecs.opensuse.org/openh264/openSUSE_Leap repo-openh264
这步不用了///localhost:~ #sudo zypper install gstreamer-1.20-plugin-openh264
Checking for file conflicts: …[done]
( 1/50) Installing: chromium-ffmpeg-extra-103.0.5060.114-150400.2.pm.1.x86_64 …[done]
( 2/50) Installing: libmodplug1-0.8.9.0+git20170610.f6dd59a-pm154.3.1.x86_64 …[done]
( 3/50) Installing: libtag1-1.13-pm154.2.2.x86_64 …[done]
( 4/50) Installing: flash-player-32.0.0.465-pm154.3.1.x86_64 …[done]
( 5/50) Installing: libavutil55-3.4.12-pm150400.1.1.x86_64 …[done]
( 6/50) Installing: libx264-164-0.164+git20220602.baee400f-pm154.1.1.x86_64 …[done]
( 7/50) Installing: libdca0-0.0.7-pm154.1.4.x86_64 …[done]
( 8/50) Installing: libvlccore9-3.0.18-150400.2.6.pm.1.x86_64 …[done]
( 9/50) Installing: libopencore-amrwb0-0.1.6-pm154.1.1.x86_64 …[done]
(10/50) Installing: libavutil56_70-4.4.4-150400.1.pm.1.x86_64 …[done]
(11/50) Installing: libxvidcore4-1.3.7-pm154.1.3.x86_64 …[done]
(12/50) Installing: libfdk-aac2-2.0.2-pm154.1.3.x86_64 …[done]
(13/50) Installing: libopencore-amrnb0-0.1.6-pm154.1.1.x86_64 …[done]
(14/50) Installing: libde265-0-1.0.9-pm154.1.1.x86_64 …[done]
(15/50) Installing: libswresample2-3.4.12-pm150400.1.1.x86_64 …[done]
(16/50) Installing: libswscale4-3.4.12-pm150400.1.1.x86_64 …[done]
(17/50) Installing: libpostproc54-3.4.12-pm150400.1.1.x86_64 …[done]
(18/50) Installing: libvlc5-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(19/50) Installing: libavresample4_0-4.4.4-150400.1.pm.1.x86_64 …[done]
(20/50) Installing: libswscale5_9-4.4.4-150400.1.pm.1.x86_64 …[done]
(21/50) Installing: libpostproc55_9-4.4.4-150400.1.pm.1.x86_64 …[done]
(22/50) Installing: libswresample3_9-4.4.4-150400.1.pm.1.x86_64 …[done]
(23/50) Installing: gstreamer-plugins-ugly-codecs-1.20.1-pm154.1.5.x86_64 …[done]
(24/50) Installing: gstreamer-plugins-bad-codecs-1.20.1-pm154.3.1.x86_64 …[done]
(25/50) Installing: libheif1-1.15.2-150400.5.pm.1.x86_64 …[done]
(26/50) Installing: libavcodec57-3.4.12-pm150400.1.1.x86_64 …[done]
(27/50) Installing: libavcodec58_134-4.4.4-150400.1.pm.1.x86_64 …[done]
(28/50) Installing: libavformat57-3.4.12-pm150400.1.1.x86_64 …[done]
(29/50) Installing: libavformat58_76-4.4.4-150400.1.pm.1.x86_64 …[done]
(30/50) Installing: libSPIRV-Tools-suse15-2020.1~git24-1.26.x86_64 …[done]
(31/50) Installing: libebml5-1.4.2-bp154.2.69.x86_64 …[done]
(32/50) Installing: libglslang-suse9-8.13.3559+git20-1.27.x86_64 …[done]
(33/50) Installing: libixml11-1.14.12-bp154.1.66.x86_64 …[done]
(34/50) Installing: libliveMedia102-2021.11.23-bp154.1.72.x86_64 …[done]
(35/50) Installing: libvidstab1_1-1.1.0-bp154.1.31.x86_64 …[done]
(36/50) Installing: libmatroska7-1.6.3-bp154.1.50.x86_64 …[done]
(37/50) Installing: libshaderc_shared1-2019.1-1.26.x86_64 …[done]
(38/50) Installing: libupnp17-1.14.12-bp154.1.66.x86_64 …[done]
(39/50) Installing: libplacebo192-4.192.1-bp154.1.45.x86_64 …[done]
(40/50) Installing: libavfilter7_110-4.4.4-150400.1.pm.1.x86_64 …[done]
(41/50) Installing: vlc-noX-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(42/50) Installing: vlc-codec-gstreamer-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(43/50) Installing: libavdevice58_13-4.4.4-150400.1.pm.1.x86_64 …[done]
(44/50) Installing: vlc-codecs-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(45/50) Installing: ffmpeg-4-4.4.4-150400.1.pm.1.x86_64 …[done]
(46/50) Installing: vlc-qt-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(47/50) Installing: vlc-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(48/50) Installing: vlc-vdpau-3.0.18-150400.2.6.pm.1.x86_64 …[done]
(49/50) Installing: netease-cloud-music-1.2.1-pm154.5.2.x86_64 …[done]
(50/50) Installing: vlc-lang-3.0.18-150400.2.6.pm.1.noarch …[done]
————————————————
版权声明:本文为CSDN博主「sukida100」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_42145772/article/details/130317088
如果使用的是openSUSE-Tumbleweed版本,就不用自行安装视频解码器了,可以直接播放哔哩哔哩网站的视频了。