無法為 fedora 23 安裝影片外掛
執行 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
根據新資訊重做答案;隨後進行了一些快速編輯-
你的 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 密鑰後,您應該能夠重試失敗的步驟並從那裡繼續。
如果您隨後收到諸如“缺少用於 repo 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
現在你應該可以繼續了。