Compiled ffmpeg, but missing shared library?

On a Pi 3 B+, I compiled ffmpeg to be able to use a feature that is not a part of its default build. The specifics I used, taken from Making sure you're not a bot!, were:

cd ~/ffmpeg_sources && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs="-lpthread -lm" \
  --ld="g++" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-gnutls \
  --enable-libaom \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libsvtav1 \
  --enable-libdav1d \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree && \
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r

However, some weird things happened after this. After logging out of dietpi which I compiled with and logging back in as suggested, it appears my PATH variable did not include the path that the binary was output to. After moving the binary to /usr/local/bin/, the binary is now complaining about a missing shared library. However, notice the output:

dietpi@projectpi2:~$ ffmpeg
ffmpeg: error while loading shared libraries: libSvtAv1Enc.so.3: cannot open shared object file: No such file or directory
dietpi@projectpi2:~$ ls /usr/local/lib
libSvtAv1Enc.so  libSvtAv1Enc.so.3  libSvtAv1Enc.so.3.1.2  pkgconfig  python3.11
dietpi@projectpi2:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

At this point, I’m not sure how to continue troubleshooting. What would be the next steps to diagnose this issue?

E: Resolved via https://stackoverflow.com/questions/12901706/ffmpeg-error-in-linux
Add /usr/local/bin/ to /etc/ld.so.conf and run ldconfig.

Marking as solved

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.