Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加rpmfusion源替换指南 #239

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions source/rpmfusion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ RPM Fusion 是为 Fedora/RHEL 提供额外 RPM 软件包的第三方软件源。

如果 ``sudo`` 不可用,你可以把以上命令中的 ``sudo`` 替换成 ``su -c`` 。

替换源地址
====

安装成功后,可使用下列命令备份并修改 ``/etc/yum.repos.d/`` 目录下以 ``rpmfusion`` 开头,以 ``.repo`` 结尾的文件。

- 具体而言,需要将文件中 ``metalink=`` 开头的行注释掉,取消 ``baseurl=`` 开头的行的注释并将等号后面链接中的 ``http://download1.rpmfusion.org`` 替换为 ``https://mirrors.ustc.edu.cn/rpmfusion`` ::

sudo sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download1.rpmfusion.org|baseurl=https://mirrors.ustc.edu.cn/rpmfusion|g' \
-i.bak \
/etc/yum.repos.d/rpmfusion*.repo

- 修改完成后,清除并重建缓存::

sudo dnf clean all
sudo dnf makecache

备注
====

Expand Down
Loading