Centos

ffmpeg 無法百勝

  • July 11, 2021

我在 CentOS8 上。我面臨與這個問題類似的情況,嘗試了答案中建議的所有內容,但無法解決。

為什麼我不能在 CentOS 7 上安裝 ffmpeg

我正在嘗試安裝需要 ffmpeg-libs 和需要 libgcrypt 的 ffmpeg-devel。systemd 需要 Libgcrypt,它是受保護的包,無法解除安裝。Libgcrypt-1.8.5-4.el8 是比 libgcrypt-1.5.3-14.el7 更新的版本。

如何進行ffmpeg-devel?它已經持續了3天。

> 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。

提前致謝

您正在嘗試在 CentOS 8 上安裝 CentOS 7 的軟體包。這不起作用。您必須安裝為 CentOS 8 建構的相應軟體包。

您似乎還為該系統上的 CentOS 7 添加了一個 yum 儲存庫。這也不起作用,因為它的任何包都不能安裝。將其替換為 CentOS 8 對應的 yum 儲存庫。

@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}...

引用自:https://serverfault.com/questions/1066652