<p>Restarting the PC next day solved the problem!</p>

CC BY-SA 4.0
2024-08-13T01:03:10.170Z
2024-08-13T01:03:10.170Z
kal
<p>Environment: WSL Ubuntu 22.04. ([interop] appendWindowsPath = false)</p>
<p>Ran <code>git clone https://git.ffmpeg.org/ffmpeg.git</code></p>
<p>Installed bunch of dependencies</p>
<p>The command</p>
<pre><code>./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-vulkan \
        --enable-pic --enable-bzlib --enable-gpl --enable-libgsm --enable-cuda \
        --enable-cuvid --enable-iconv --enable-lzma --enable-nvenc --enable-zlib \
        --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-libmp3lame \
        --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 \
        --enable-libx265 --enable-libaom --enable-debug --enable-libfdk-aac \
        --enable-libfreetype --enable-libvpl --enable-libmysofa --enable-libopencore-amrwb \
        --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-frei0r \
        --enable-libspeex --enable-libvmaf --enable-libtheora --enable-libtwolame \
        --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 \
        --enable-libzimg --enable-libshine --enable-libxvid --enable-libopenmpt \
        --enable-version3 --enable-libsrt --enable-libsvtav1 --enable-libcaca \
        --enable-libcdio --enable-libilbc --enable-libkvazaar --enable-libmodplug \
        --enable-librist --enable-librtmp --enable-librubberband --enable-libtesseract \
        --enable-libzmq --enable-libzvbi --enable-openal --enable-ladspa --enable-libglslang \
        --enable-libxavs2 --enable-libplacebo --enable-libjxl --enable-opencl --enable-opengl \
        --enable-libopenh264 --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared
</code></pre>
<p>runs without complaint. Maybe worth noting that, even though I changed configuration, the last configure run generated:</p>
<pre><code>License: nonfree and unredistributable
libavutil/avconfig.h is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
</code></pre>
<p><code>make -j$(nproc)</code> generates lots of (e.g.) <code>CC      libavfilter/*</code> lines</p>
<p>libavdevice lines look clean:</p>
<pre><code>CC      libavdevice/alldevices.o
CC      libavdevice/alsa.o
CC      libavdevice/alsa_dec.o
CC      libavdevice/alsa_enc.o
CC      libavdevice/avdevice.o
CC      libavdevice/caca.o
CC      libavdevice/fbdev_common.o
CC      libavdevice/fbdev_dec.o
CC      libavdevice/fbdev_enc.o
CC      libavdevice/kmsgrab.o
CC      libavdevice/lavfi.o
CC      libavdevice/libcdio.o
CC      libavdevice/openal-dec.o
CC      libavdevice/opengl_enc.o
CC      libavdevice/oss.o
CC      libavdevice/oss_dec.o
CC      libavdevice/oss_enc.o
CC      libavdevice/sdl2.o
CC      libavdevice/sndio.o
CC      libavdevice/sndio_dec.o
CC      libavdevice/sndio_enc.o
CC      libavdevice/utils.o
CC      libavdevice/v4l2-common.o
CC      libavdevice/v4l2.o
CC      libavdevice/v4l2enc.o
CC      libavdevice/version.o
CC      libavdevice/xcbgrab.o
CC      libavdevice/xv.o
</code></pre>
<p>There are instances of output like this: (e.g.):</p>
<pre><code>In file included from ./libavutil/common.h:48,
                 from ./libavutil/avutil.h:301,
                 from ./libavutil/opt.h:31,
                 from libavdevice/sdl2.c:31:
./config.h:338: warning: &quot;HAVE_PTHREAD_SETNAME_NP&quot; redefined
</code></pre>
<p><code>sudo make install</code> outputs mostly &quot;INSTALL&quot;s and some &quot;STRIP&quot;s</p>
<p>Running ffmpeg gives:</p>
<pre><code>ffmpeg: error while loading shared libraries: libavdevice.so.61: cannot open shared object file: No such file or directory
</code></pre>
<p><code>which ffmpeg</code> gives <code>/usr/local/bin/ffmpeg</code></p>
<p>The content of /etc/lib/x86_64-linux-gnu.conf is</p>
<pre><code># Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
</code></pre>
<p><code>dpkg -l | grep libavdevice</code> gives:</p>
<pre><code>ii  libavdevice-dev:amd64                 7:6.1-1build2~22.04                     amd64        FFmpeg library for handling input and output devices - development files
ii  libavdevice58:amd64                   7:4.4.2-0ubuntu0.22.04.1                amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavdevice60:amd64                   7:6.1-1build2~22.04                     amd64        FFmpeg library for handling input and output devices - runtime files
</code></pre>
<p><code>dpkg -L libavdevice-dev</code> gives:</p>
<pre><code>/.
/usr
/usr/include
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/libavdevice
/usr/include/x86_64-linux-gnu/libavdevice/avdevice.h
/usr/include/x86_64-linux-gnu/libavdevice/version.h
/usr/include/x86_64-linux-gnu/libavdevice/version_major.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libavdevice.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libavdevice.pc
/usr/share
/usr/share/doc
/usr/share/doc/libavdevice-dev
/usr/share/doc/libavdevice-dev/changelog.Debian.gz
/usr/share/doc/libavdevice-dev/copyright
/usr/lib/x86_64-linux-gnu/libavdevice.so
</code></pre>
<p><code>sudo find / -name libavdevice.so.61</code> gives:</p>
<p><code>/home/&lt;my-home&gt;/git/ffmpeg/libavdevice/libavdevice.so.61</code></p>
<p>Note: I have run numerous <code>make</code>s. I've also installed vulkan SDK, and a bunch of cuda packages (following Nvidia's instructions/wikis.) I might have done other things I've forgotten.</p>
<p>How do I resolve this ffmpeg runtime error?</p>
<p>Do I have conflicts in libraries? I am mostly interested in using GPU features/HW, especially shaders. I've just started and kinda feeling my way around.</p>
<p>Thank you.</p>

<ffmpeg>
ffmpeg cannot load an installed library - libavdevice.so.60
kal
# ffmpeg cannot load an installed library - libavdevice.so.60

(Asked by: username_0 on 2024-08-10)

Environment: WSL Ubuntu 22.04. ([interop] appendWindowsPath = false)
Ran git clone https://git.ffmpeg.org/ffmpeg.git
Installed bunch of dependencies
The command
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-vulkan \
        --enable-pic --enable-bzlib --enable-gpl --enable-libgsm --enable-cuda \
        --enable-cuvid --enable-iconv --enable-lzma --enable-nvenc --enable-zlib \
        --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-libmp3lame \
        --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 \
        --enable-libx265 --enable-libaom --enable-debug --enable-libfdk-aac \
        --enable-libfreetype --enable-libvpl --enable-libmysofa --enable-libopencore-amrwb \
        --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-frei0r \
        --enable-libspeex --enable-libvmaf --enable-libtheora --enable-libtwolame \
        --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 \
        --enable-libzimg --enable-libshine --enable-libxvid --enable-libopenmpt \
        --enable-version3 --enable-libsrt --enable-libsvtav1 --enable-libcaca \
        --enable-libcdio --enable-libilbc --enable-libkvazaar --enable-libmodplug \
        --enable-librist --enable-librtmp --enable-librubberband --enable-libtesseract \
        --enable-libzmq --enable-libzvbi --enable-openal --enable-ladspa --enable-libglslang \
        --enable-libxavs2 --enable-libplacebo --enable-libjxl --enable-opencl --enable-opengl \
        --enable-libopenh264 --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared

runs without complaint. Maybe worth noting that, even though I changed configuration, the last configure run generated:
License: nonfree and unredistributable
libavutil/avconfig.h is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged

make -j$(nproc) generates lots of (e.g.) CC      libavfilter/* lines
libavdevice lines look clean:
CC      libavdevice/alldevices.o
CC      libavdevice/alsa.o
CC      libavdevice/alsa_dec.o
CC      libavdevice/alsa_enc.o
CC      libavdevice/avdevice.o
CC      libavdevice/caca.o
CC      libavdevice/fbdev_common.o
CC      libavdevice/fbdev_dec.o
CC      libavdevice/fbdev_enc.o
CC      libavdevice/kmsgrab.o
CC      libavdevice/lavfi.o
CC      libavdevice/libcdio.o
CC      libavdevice/openal-dec.o
CC      libavdevice/opengl_enc.o
CC      libavdevice/oss.o
CC      libavdevice/oss_dec.o
CC      libavdevice/oss_enc.o
CC      libavdevice/sdl2.o
CC      libavdevice/sndio.o
CC      libavdevice/sndio_dec.o
CC      libavdevice/sndio_enc.o
CC      libavdevice/utils.o
CC      libavdevice/v4l2-common.o
CC      libavdevice/v4l2.o
CC      libavdevice/v4l2enc.o
CC      libavdevice/version.o
CC      libavdevice/xcbgrab.o
CC      libavdevice/xv.o

There are instances of output like this: (e.g.):
In file included from ./libavutil/common.h:48,
                 from ./libavutil/avutil.h:301,
                 from ./libavutil/opt.h:31,
                 from libavdevice/sdl2.c:31:
./config.h:338: warning: "HAVE_PTHREAD_SETNAME_NP" redefined

sudo make install outputs mostly "INSTALL"s and some "STRIP"s
Running ffmpeg gives:
ffmpeg: error while loading shared libraries: libavdevice.so.61: cannot open shared object file: No such file or directory

which ffmpeg gives /usr/local/bin/ffmpeg
The content of /etc/lib/x86_64-linux-gnu.conf is
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

dpkg -l | grep libavdevice gives:
ii  libavdevice-dev:amd64                 7:6.1-1build2~22.04                     amd64        FFmpeg library for handling input and output devices - development files
ii  libavdevice58:amd64                   7:4.4.2-0ubuntu0.22.04.1                amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavdevice60:amd64                   7:6.1-1build2~22.04                     amd64        FFmpeg library for handling input and output devices - runtime files

dpkg -L libavdevice-dev gives:
/.
/usr
/usr/include
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/libavdevice
/usr/include/x86_64-linux-gnu/libavdevice/avdevice.h
/usr/include/x86_64-linux-gnu/libavdevice/version.h
/usr/include/x86_64-linux-gnu/libavdevice/version_major.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libavdevice.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libavdevice.pc
/usr/share
/usr/share/doc
/usr/share/doc/libavdevice-dev
/usr/share/doc/libavdevice-dev/changelog.Debian.gz
/usr/share/doc/libavdevice-dev/copyright
/usr/lib/x86_64-linux-gnu/libavdevice.so

sudo find / -name libavdevice.so.61 gives:
/home//git/ffmpeg/libavdevice/libavdevice.so.61
Note: I have run numerous makes. I've also installed vulkan SDK, and a bunch of cuda packages (following Nvidia's instructions/wikis.) I might have done other things I've forgotten.
How do I resolve this ffmpeg runtime error?
Do I have conflicts in libraries? I am mostly interested in using GPU features/HW, especially shaders. I've just started and kinda feeling my way around.
Thank you.

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_0 on 2024-08-13. Score: 0

Restarting the PC next day solved the problem!


---

