fedora下安装MP3,视频解码器提示 No package,,,,,,,,,,,available解决办法

1、su root

2、yum install gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg


如果出现“No package gstreamer-plugins-ugly available.No package gstreamer-plugins-bad available.No package gstreamer-ffmpeg available.”等错误,则需要安装YUM源,其方法如下:

    

rpm -ivh http://rpm.livna.org/livna-release.rpm

    

rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

    

rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

安装完成后再重复第一步即可。

 

然后打开一首歌,,,,惊喜!!!


ed psutil-7.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (279 kB) Downloading scipy-1.15.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (35.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.5/35.5 MB 14.6 MB/s eta 0:00:00 Downloading tornado-6.5.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (443 kB) Downloading absl_py-2.3.1-py3-none-any.whl (135 kB) Using cached jinja2-3.1.6-py3-none-any.whl (134 kB) Using cached MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (21 kB) Installing collected packages: tornado, scipy, psutil, ml-dtypes, MarkupSafe, decorator, cloudpickle, attrs, absl-py, jinja2 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. op-compile-tool 0.1.0 requires getopt, which is not installed. op-compile-tool 0.1.0 requires inspect, which is not installed. op-compile-tool 0.1.0 requires multiprocessing, which is not installed. Successfully installed MarkupSafe-3.0.2 absl-py-2.3.1 attrs-25.3.0 cloudpickle-3.1.1 decorator-5.2.1 jinja2-3.1.6 ml-dtypes-0.5.1 psutil-7.0.0 scipy-1.15.3 tornado-6.5.1 (wanxiang_env) [root@localhost pythonenv]# sudo yum install -y pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libswresample-dev Repository appstream is listed more than once in the configuration Repository baseos is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository powertools is listed more than once in the configuration github_git-lfs 88 B/s | 833 B 00:09 github_git-lfs-source 155 B/s | 833 B 00:05 软件包 pkgconf-pkg-config-1.4.2-1.el8.aarch64 已安装。 未找到匹配的参数: libavformat-dev 未找到匹配的参数: libavcodec-dev 未找到匹配的参数: libavdevice-dev 未找到匹配的参数: libavutil-dev 未找到匹配的参数: libavfilter-dev 未找到匹配的参数: libswscale-dev 未找到匹配的参数: libswresample-dev 错误:没有任何匹配: libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libswresample-dev (wanxiang_env) [root@localhost pythonenv]# 报错了
07-18
<think>我们正在解决用户执行 `yum install` 时提示 `No package available` 的问题。根据引用内容,主要原因是没有安装 EPEL 仓库,因为 CentOS 默认仓库可能不包含某些软件包。EPEL 仓库提供了大量的额外软件包。 解决方案: 1. 安装 EPEL 仓库。 2. 然后再次尝试安装软件。 具体步骤: 方法一:直接安装 epel-release 包(推荐) ```bash sudo yum install epel-release ``` 方法二:如果方法一不行,可以手动下载并安装对应版本的 epel-release 包(注意选择与系统版本匹配的包): 例如 CentOS 7: ```bash # 下载 EPEL 7 的包(注意:实际URL可能需要根据镜像源更新,这里使用中国科技大学的镜像) wget http://mirrors.ustc.edu.cn/fedora/epel/7/x86_64/e/epel-release-7-14.noarch.rpm # 安装 sudo yum install epel-release-7-14.noarch.rpm ``` 安装完 EPEL 仓库后,更新 yum 缓存: ```bash sudo yum clean all sudo yum makecache ``` 然后再次尝试安装需要的软件包,例如: ```bash sudo yum install npm ``` 注意:有时安装完 EPEL 仓库后,可能需要导入 GPG 密钥。如果遇到 GPG 密钥错误,可以尝试导入: ```bash sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 ``` 如果问题仍然存在,可以检查 EPEL 仓库是否启用: ```bash yum repolist ``` 查看输出中是否有 epel 仓库。 如果 epel 仓库没有启用,可以检查配置文件 `/etc/yum.repos.d/epel.repo`,确保其中的 `enabled=1`。 总结步骤: 1. 安装 EPEL 仓库。 2. 更新 yum 缓存。 3. 再次安装所需软件。 根据引用[2][3][4],这是最常见的解决方案。 注意:EPEL 版本必须与 CentOS 版本对应(如 CentOS7 对应 EPEL7)。 如果用户的问题不是 CentOS7,而是其他版本,则需要下载对应版本的 EPEL 包。例如 CentOS6 使用 EPEL6。 另外,如果用户使用的不是 CentOS,而是 RHEL,那么可能需要订阅才能使用官方源,但同样可以通过安装 EPEL 来获得额外的软件包。 相关问题: §§相关问题§§ 1. 如何为 RHEL 系统安装 EPEL 仓库? 2. 如何验证 EPEL 仓库已经成功安装并启用? 3. 安装 EPEL 仓库后仍然找不到软件包怎么办? 4. 如何配置 EPEL 镜像源加速下载? 5. 如何解决安装 EPEL 仓库时的 GPG 密钥验证失败问题? </think>### 解决 `yum install` 提示 "No package available" 的完整方案 #### 📦 根本原因分析 当执行 `yum install` 命令时出现 `No package available` 错误,通常是由于以下原因: 1. **缺少 EPEL 仓库** CentOS/RHEL 默认仓库不包含某些软件包(如 npm),需要 EPEL 仓库提供扩展支持[^2][^3] 2. **仓库配置错误** 仓库未启用、镜像失效或配置冲突导致包索引失败 3. **软件包名称错误** 软件包在不同仓库中的命名可能不同 4. **系统版本不匹配** EPEL 仓库版本必须与系统版本严格对应(如 CentOS7 ➔ EPEL7)[^4] --- ### 🔧 分步解决方案 #### 步骤 1:安装 EPEL 仓库(核心步骤) ```bash # CentOS/RHEL 7 系统 sudo yum install epel-release # 验证安装 yum repolist | grep epel ``` > 正确输出应包含:`epel/x86_64` 和启用状态 `enabled=1`[^2] #### 步骤 2:修复仓库配置问题 ```bash # 清理缓存重建索引 sudo yum clean all sudo yum makecache # 检查仓库状态 sudo yum repolist all ``` #### 步骤 3:手动安装 EPEL(可选) 当 `yum install epel-release` 失败时: ```bash # CentOS 7 系统手动安装 wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo rpm -ivh epel-release-latest-7.noarch.rpm # 导入GPG密钥(关键步骤) sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 ``` #### 步骤 4:正确安装软件包 ```bash # 搜索确认包名 yum search <package_name> # 安装示例(npm) sudo yum install npm --enablerepo=epel ``` --- ### ⚠️ 关键注意事项 1. **版本匹配原则** EPEL 版本必须与系统版本严格对应: ``` CentOS 7 ➔ EPEL 7 CentOS 8 ➔ EPEL 8 ``` 2. **GPG 密钥问题** 安装 EPEL 后需导入签名密钥: ```bash # CentOS 7 sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 ``` 3. **镜像加速技巧** 替换为国内镜像提升速度: ```bash sudo sed -e 's|^metalink=|#metalink=|g' \ -e 's|^#baseurl=|baseurl=|g' \ -e 's|https://download.example/pub|https://mirrors.aliyun.com|g' \ -i /etc/yum.repos.d/epel*.repo ``` --- ### 🌐 验证方案 ```bash # 检查仓库状态 yum repolist | grep -E "epel|base" # 测试软件包搜索 yum search npm --enablerepo=epel # 查看仓库配置 cat /etc/yum.repos.d/epel.repo ``` > 正常输出应包含 EPEL 仓库的有效 URL 和启用状态
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值