![在 Centos 7 上安装 mplayer](https://linux22.com/image/5278/%E5%9C%A8%20Centos%207%20%E4%B8%8A%E5%AE%89%E8%A3%85%20mplayer.png)
我已经尝试了几天在 Centos 7 上安装 mplayer 但没有成功,我安装了很多存储库但没有任何效果,我总是出现以下错误:
-> Resolve Dependencies completed
Error: Package: 4: mplayer-1.2-93_snap20140413.el7.x86_64 (atrpms)
Requires: libaudio.so.2 () (64bit)
Error: Package: 4: mplayer-1.2-93_snap20140413.el7.x86_64 (atrpms)
Requires: libvga.so.1 () (64bit)
Error: Package: 4: mplayer-1.2-93_snap20140413.el7.x86_64 (atrpms)
Requires: libartsc.so.0 () (64bit)
Error: Package: mpg123-1.18.1-1.el7.x86_64 (atrpms)
Requires: libaudio.so.2 () (64bit)
Error: Package: 4:mplayer-1.2-93_snap20140413.el7.x86_64 (atrpms)
Requires: libnemesi.so.1 () (64bit)
Error: Package: mpg123-1.18.1-1.el7.x86_64 (atrpms)
Requires: libartsc.so.0 () (64bit)
You can try using --skip-broken to work around the problem
You can try running: rpm -Va --nofiles --nodigest
我使用以下存储库:
yum repolist enabled
atrpms/7/x86_64 Fedora Core 7 - x86_64 - ATrpms 827
base/7/x86_64 CentOS-7 - Base 8 465
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 7 419
extras/7/x86_64 CentOS-7 - Extras 104
rpmforge RHEL 7 - RPMforge.net - dag 245
rpmforge-extras RHEL 7 - RPMforge.net - extras 10
updates/7/x86_64 CentOS-7 - Updates
repolist: 18 794
任何想法 ?
答案1
感谢您的帮助,我已经找到解决办法了,已经下载了rpmfind.net并一一安装缺少的依赖项,但对于 Fedora 20 64 位(Fedora 19 64 位的依赖项不完整),它可以完美运行。
答案2
EL7/CentOS7 版 Mplayer 已上线转速融合。
所以就这样做
curl -O https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
获得免费回购 RPM,加上
curl -O https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
如果您还想要非免费编解码器,那么请执行以下操作
sudo yum localinstall *.rpm
进而
sudo yum install mplayer
答案3
问题是缺少依赖项。也许 CentOS 7 仍然是新的,还没有为其构建所有软件包。看来您可以改用 fedora 19 软件包。也就是说,从 fedora19 yum 存储库下载您需要的软件包,然后安装它们。
看来您可以按照本教程进行操作: http://hasis053341.blogspot.com/2014/07/installing-mplayer-on-centos-7.html
答案4
对我来说,在 RHEL 7.3 上安装的最简单方法mplayer
是手动将
- 软呢帽和
- Fedora 的 rpmfusion
我的存储库目录中的存储库/etc/yum.repos.d/
。
我只是从另一台安装了 Fedora 21 的机器上复制它们并将变量更改$releasever
为 20。
创建存储库文件
以下命令将在您的存储库目录中创建 rpmfusion 和 fedora 的存储库文件(将它们复制并粘贴到 RHEL 7 或 CentOS 7 终端):
echo '[fedora]
name=Fedora 20 - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-20&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch' | sudo tee /etc/yum.repos.d/fedora.repo
echo '[updates]
name=Fedora 20 - $basearch - Updates
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/20/$basearch/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f20&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch' | sudo tee /etc/yum.repos.d/fedora-updates.repo
echo '[rpmfusion-free]
name=RPM Fusion for Fedora 20 - Free
#baseurl=http://download1.rpmfusion.org/free/fedora/releases/20/Everything/$basearch/os/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-20&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-20' | sudo tee /etc/yum.repos.d/rpmfusion-free.repo
echo '[rpmfusion-free-updates]
name=RPM Fusion for Fedora 20 - Free - Updates
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/20/$basearch/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-20&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-20' | sudo tee /etc/yum.repos.d/rpmfusion-free-updates.repo
echo '[rpmfusion-nonfree]
name=RPM Fusion for Fedora 20 - Nonfree
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/releases/20/Everything/$basearch/os/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-20&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-20' | sudo tee /etc/yum.repos.d/rpmfusion-nonfree.repo
echo '[rpmfusion-nonfree-updates]
name=RPM Fusion for Fedora 20 - Nonfree - Updates
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/updates/20/$basearch/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-20&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-20' | sudo tee /etc/yum.repos.d/rpmfusion-nonfree-updates.repo
安装mplayer
首先,为了避免与数据库中的旧内容发生任何冲突,请执行以下操作:
sudo yum clean all
现在只需安装 mplayer:
sudo yum install --nogpgcheck mplayer
--nogpgcheck
我使用了禁用 gpgcheck 的选项。否则你必须导入 gpg-keys(我没有这样做)。
禁用或删除存储库文件
然后删除 repo 文件(或设置enabled
为 0)。
禁用它们:
sudo sed -i 's%enabled=1%enabled=0%' /etc/yum.repos.d/{fedora*,rpmfusion-*}
或者删除它们:
sudo rm /etc/yum.repos.d/{fedora*,rpmfusion-*}
附:
您现在还可以安装ffmpeg
等。