ffmpeg 无法使用 yum

ffmpeg 无法使用 yum

我在 CentOS8 上。我遇到了与此问题类似的情况,尝试了答案中建议的所有方法,但无法解决。

为什么我无法在 CentOS 7 上安装 ffmpeg

我正在尝试安装 ffmpeg-devel,它需要 ffmpeg-libs 和 libgcrypt。systemd 需要 Libgcrypt,它是受保护的软件包,无法卸载。Libgcrypt-1.8.5-4.el8 比 libgcrypt-1.5.3-14.el7 更新。

ffmpeg-devel 怎么办?已经三天了。

> sudo yum install ffmpeg-libs-3.4.8-1.el7.x86_64.rpm
Last metadata expiration check: 0:14:09 ago on Mon 14 Jun 2021 05:35:40 PM IST.
Error:
 Problem: conflicting requests
  - nothing provides libgcrypt.so.11()(64bit) needed by ffmpeg-libs-3.4.8-1.el7.x86_64
  - nothing provides libgcrypt.so.11(GCRYPT_1.2)(64bit) needed by ffmpeg-libs-3.4.8-1.el7.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

> sudo yum install ffmpeg-devel
Last metadata expiration check: 0:11:18 ago on Mon 14 Jun 2021 05:35:40 PM IST.
Error:
 Problem: package ffmpeg-devel-3.4.8-1.el7.x86_64 requires libpostproc.so.54()(64bit), but none of the providers can be installed
  - package ffmpeg-devel-3.4.8-1.el7.x86_64 requires libswresample.so.2()(64bit), but none of the providers can be installed
  - package ffmpeg-devel-3.4.8-1.el7.x86_64 requires ffmpeg-libs(x86-64) = 3.4.8-1.el7, but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides libgcrypt.so.11()(64bit) needed by ffmpeg-libs-3.4.8-1.el7.x86_64
  - nothing provides libgcrypt.so.11(GCRYPT_1.2)(64bit) needed by ffmpeg-libs-3.4.8-1.el7.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

> sudo yum list libgcrypt
Last metadata expiration check: 0:05:26 ago on Mon 14 Jun 2021 05:35:40 PM IST.
Installed Packages
libgcrypt.x86_64                                                        1.8.5-4.el8                                                        @anaconda
Available Packages
libgcrypt.i686                                                          1.8.5-4.el8                                                        baseos

> sudo yum list systemd-libs
Last metadata expiration check: 0:06:37 ago on Mon 14 Jun 2021 05:35:40 PM IST.
Installed Packages
systemd-libs.x86_64                                                        239-45.el8                                                        @baseos
Available Packages
systemd-libs.i686                                                          239-45.el8                                                        baseos

> sudo yum install libgcrypt-1.5.3-14.el7.x86_64.rpm
Last metadata expiration check: 0:04:41 ago on Mon 14 Jun 2021 06:00:22 PM IST.
Error:
 Problem: problem with installed package systemd-libs-239-45.el8.x86_64
  - package systemd-libs-239-45.el8.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed
  - package systemd-libs-239-45.el8.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed
  - cannot install both libgcrypt-1.5.3-14.el7.x86_64 and libgcrypt-1.8.5-4.el8.x86_64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use
not only best candidate packages)

如果有遗漏的地方请提出建议。我真的被这个问题难住了。有没有解决方法或 ffmpeg 的替代方案。

提前致谢

答案1

您正在尝试在 CentOS 8 上安装适用于 CentOS 7 的软件包。这行不通。您必须安装为 CentOS 8 构建的相应软件包。

看来您还在此系统上添加了 CentOS 7 的 yum 存储库。这也不起作用,因为无法安装其任何软件包。将其替换为 CentOS 8 的相应 yum 存储库。

答案2

@Michael Hampton 非常感谢您的回答,我可以安装 ffmpeg,以下是输出:

/etc/yum.repos.d> ffmpeg
ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (GCC)
  configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg --disable-debug --disable-static --disable-stripping --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avresample --enable-alsa --enable-bzlib --enable-chromaprint --enable-decklink --enable-frei0r --enable-gcrypt --enable-gmp --enable-gnutls --enable-gpl --enable-gray --enable-iconv --enable-ladspa --enable-libass --enable-libaom --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdc1394 --enable-libdav1d --enable-libdavs2 --enable-libdrm --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libilbc --enable-libjack --enable-libkvazaar --enable-liblensfun --enable-libmodplug --enable-libmp3lame --enable-libndi_newtek --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-librtmp --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxcb --enable-libxcb-shape --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-lzma --enable-nonfree --enable-openal --enable-opencl --enable-opengl --enable-postproc --enable-sdl2 --enable-shared --enable-swresample --enable-swscale --enable-vaapi --enable-version3 --enable-vdpau --enable-xlib --enable-zlib --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --prefix=/usr --shlibdir=/usr/lib64 --enable-libzmq --enable-vapoursynth --enable-cuda --enable-cuvid --enable-ffnvcodec --enable-libmfx --enable-libnpp --enable-libsvtav1 --enable-libsvthevc --enable-libsvtvp9 --enable-libvmaf --enable-nvdec --enable-nvenc --extra-cflags=-I/usr/include/cuda --cpu=x86_64
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

相关内容