![无法为 fedora 23 安装视频插件](https://linux22.com/image/88276/%E6%97%A0%E6%B3%95%E4%B8%BA%20fedora%2023%20%E5%AE%89%E8%A3%85%E8%A7%86%E9%A2%91%E6%8F%92%E4%BB%B6.png)
当我进行 repolist 时,我看到以下存储库:
1) google-chrome
2) rpmfusion-nonfree
3) rpmfusion-nonfree-updates-testing
yum install vlc
但像其他行这样的命令yum install gstream-plugins-ugly
不起作用。
我尝试安装免费的 rpmfusion 存储库
[root@dhcp223-30 yum.repos.d]# sudo rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
Retrieving http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
warning: /var/tmp/rpm-tmp.M25qoM: Header V4 RSA/SHA1 Signature, key ID 97f4d1c1: NOKEY
Preparing... ################################# [100%]
package rpmfusion-free-release-23-0.1.noarch (which is newer than rpmfusion-free-release-22-1.noarch) is already installed
file /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora from install of rpmfusion-free-release-22-1.noarch conflicts with file from package rpmfusion-free-release-23-0.1.noarch
file /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-latest from install of rpmfusion-free-release-22-1.noarch conflicts with file from package rpmfusion-free-release-23-0.1.noarch
file /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-rawhide from install of rpmfusion-free-release-22-1.noarch conflicts with file from package rpmfusion-free-release-23-0.1.noarch
file /etc/yum.repos.d/rpmfusion-free-updates-testing.repo from install of rpmfusion-free-release-22-1.noarch conflicts with file from package rpmfusion-free-release-23-0.1.noarch
file /etc/yum.repos.d/rpmfusion-free-updates.repo from install of rpmfusion-free-release-22-1.noarch conflicts with file from package rpmfusion-free-release-23-0.1.noarch
然后启用它
[root@dhcp223-30 yum.repos.d]# sudo dnf config-manager --enablerepo=rpmfusion-free-release-stable
Error: Unknown repo: 'rpmfusion-free-release-stable'
请使用链接查找 dnf repolist all 的输出
TIA
答案1
根据新信息修改答案;随后进行了一些快速编辑 -
您的 Fedora 存储库发生了什么?
您是否从 dnf repolist 输出中编辑了 fedora 存储库?因为你似乎没有这些...
也许让我们确认您正在运行 fedora 23 :) cat /etc/redhat-release
假设您确实缺少它们,请执行以下操作,否则跳至“至少我们有 Fedora 存储库”部分
dnf install ftp://195.220.108.108/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/f/fedora-repos-23-1.noarch.rpm
# make sure they are enabled
dnf config-manager --set-enabled fedora updates updates-testing
# clean
dnf clean all
# Optional, potentially large update, but I highly recommend it.
dnf update
如果您有大型更新,特别是如果内核、systemd、dnf / yum / rpm 已更新,请在继续之前重新启动:
至少我们现在有了 Fedora Repos
以下命令将删除所有 rpmfusion 存储库并重新安装最新版本。除非路线上出现任何错误,否则我们应该能够适当地启用它们。
如果您遇到与之前遇到的类似的失败:
rpmfusion-free-release-22-1.noarch 安装中的文件 /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora 与软件包 rpmfusion-free-release-23-0.1 中的文件冲突。诺阿奇
在任何时候,请停下来,然后向右移动到有关从 RPM 中删除 GPG 密钥的部分,该部分位于本文底部。
希望你不必这样做。这并不令人愉快。
需要注意的是 - 我没有更多的 Fedora 23 机器;只是 F24,所以我在其中之一上测试了这段代码。这不应该是一个问题,我注意到有几个地方会导致一些不确定性。
以 root 身份运行所有命令。如果在任何时候卸载命令导致大量“依赖”包也被设计用于卸载,请不要继续 - 这不应该发生。
# clean up dnf just because
dnf clean all
# pull together a list of all installed rpmfusion packages
rpmflst=$(rpm -qa | grep rpmfusion)
# for a sanity check, review that output; we're going to uninstall them all
echo $rpmflst
#now remove - only click 'y' if it looks reasonable
dnf remove $rpmflst
# Double check for any stragglers
cd /etc/yum.repos.d/
ll
# Delete any .repo files (or mv them somewhere like ~/ to be safe) EXCEPT these EDIT - was 3, now 4 - forgot google:
#fedora.repo
#fedora-updates.repo
#fedora-updates-testing.repo
#google-chrome.repo
# install 'free'
dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-23.noarch.rpm
# install 'not-free'
dnf install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-23.noarch.rpm
# The first repo should be the only one needed for vlc, but we will enable a couple others (for depdendencies) as rpmfusion is harmless (I couldn't test this as vlc is in the rawhide repo for F24 beta)
dnf config-manager --set-enabled rpmfusion-free-updates-testing rpmfusion-free rpmfusion-free-updates-testing rpmfusion-nonfree rpmfusion-nonfree-updates rpmfusion-nonfree-updates-testing
# Some of those enables could fail - if they are empty, etc. For that type of error keep on going
# tidy up
dnf clean all
# Download metadata (optional - its a check of the config without involving an install)
dnf makecache
# assuming you've had no GPG errors, try installing vlc now
dnf install vlc
GPG 冲突错误解决
基本上我们只需删除报告冲突的 GPG 密钥即可。下面的链接有一个明确的指南,由于这不是您问题的主题,而且我厌倦了打字,所以我只会向您指出它 https://blog.laimbock.com/2014/05/02/how-to-remove-an-imported-gpg-key-from-rpm/
删除有问题的 GPG 密钥后,您应该能够重试失败的步骤并从那里继续。
如果您随后收到诸如“缺少存储库 XYZ 的 GPG 密钥”之类的错误,请编辑存储库文件(我找不到持续存在的 CLI 选项),如下所示:
cd /etc/yum.repos.d/
# Find the file that contains the offending repo config (e.g. rpmfusion-free-updates-testing)
vi rpmfusion-free-updates-testing.repo
Find the line where gpgcheck=1 and change to gpgcheck=0
现在您应该可以继续了。
答案2
您还需要启用 rpmfusion 免费存储库。来自命令行问题su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
。
找到命令行这里。