skip to Main Content

Dependencies:

  • Ubuntu: 20.04
  • conda: 4.12.0
  • Python: 3.8
  • Pytorch: 1.7.1
  • ffmpjpe: 4.2.3 (conda-forge)

I am facing a problem after installing FFmpeg from the conda-forge channel as follows command:

$ conda config --add channels conda-forge```
$ conda install ffmpeg

$ ffmpeg -version error message:

ffprobe: symbol lookup error: /home/user/anaconda3/envs/myenv/bin/../lib/./libgnutls.so.30: undefined symbol: mpn_add_1, version HOGWEED_4

I have also try

$ pip install ffmpeg

or

$ pip install ffprobe

or

$ conda install ffmpeg-python

But they do not work for me.

Could anyone point me out how to solve this issue??
Thanks in advance!!

3

Answers


  1. Chosen as BEST ANSWER

    I finally solved this problem by

    Step1. Install ffmpeg on your OS {e.g. in my case, Ubuntu}

    from Download FFmpeg website

    or

    for my ubuntu case, just use the following command:

    $ sudo apt-get install ffmpeg
    

    Step2. Verify the Installation

    $ ffmpeg -version
    
    ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
    built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
    configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
    libavutil      56. 31.100 / 56. 31.100
    libavcodec     58. 54.100 / 58. 54.100
    libavformat    58. 29.100 / 58. 29.100
    libavdevice    58.  8.100 / 58.  8.100
    libavfilter     7. 57.100 /  7. 57.100
    libavresample   4.  0.  0 /  4.  0.  0
    libswscale      5.  5.100 /  5.  5.100
    libswresample   3.  5.100 /  3.  5.100
    libpostproc    55.  5.100 / 55.  5.100
    

    I can confirm that FFmpeg has been installed successfully at this time. But when I run my python script, it shows different error message like

    ffmpeg: error while loading shared libraries: libx264.so.138: cannot open shared object file: No such file or directory
    

    When I retry $ ffmpeg -version it shows this error again. (I guess it was caused by a version mismatch issue??)

    So I go on the Step 3

    Step3. Re-open the terminate、Uninstall and Re-install ffmpeg from following command

    $ conda uninstall ffmpeg
    $ conda install -c conda-forge ffmpeg
    

    Re-try:

    $ ffmpeg -version
    
    ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
    built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)...
    

    Then my issue has been solved!! I can successfully run my python script now!!

    For those who stumbled upon this issue as I did. I hope this response could help and work for you too.


  2. The anaconda site suggests to try all of the below. Do you get a problem with all of the channels:

    conda install -c conda-forge ffmpeg
    conda install -c "conda-forge/label/broken" ffmpeg
    conda install -c "conda-forge/label/cf201901" ffmpeg
    conda install -c "conda-forge/label/cf202003" ffmpeg
    conda install -c "conda-forge/label/gcc7" ffmpeg
    
    Login or Signup to reply.
  3. This is likely due to channel mixing. If you need to use Conda Forge, then use just Conda Forge (it’s a standalone channel).

    conda create -n foo -c conda-forge python=3 ffmpeg ...
    

    While Anaconda documentation might imply that one can simply use packages from other channels, the fact is that they don’t test for such compatibility.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search