While the above is true, I have:

$ sudo apt install libx264-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libx264-dev is already the newest version (2:0.160.3011+gitcde9a93-2.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have built a custom ffmpeg (from this repo) with this command:

./configure --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --enable-lto --enable-neon --enable-vfp --enable-gnutls --enable-libopus --enable-hardcoded-tables --enable-libmp3lame --enable-gpl --enable-libx264 --enable-version3 --enable-nonfree --enable-libdrm --enable-librga --enable-rkmpp --enable-libfdk-aac

However during run:

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

I do understand what does this mean. But I have newer libx264 installed.

What's the recommended way to deal with this?

  1. Symlink v160 to v155?
  2. Build 155 from source?
  3. Other?

1 Answer 1


The version that was found during linktime has so version 155, and you installed version 160. So, there's a difference between the binary libx264 you installed and what ./configure found. You need to sort that out.

Symlink v160 to v155?

Definitely not. The version says "This is the ABI. If you use any other version of the library, you will crash".

Build 155 from source?

no, just make sure there's exactly one set of libraries, development headers that ./configure finds.

  • works with symlink. I really wished to get rid of libx264 dependency, but configure script is not getting me there, and ffmpeg always find libx264 no matter how hard I'm trying to disable libx264.
    – Daniel
    Apr 22, 2023 at 9:45
  • It works with a symlink until you hit a changed ABI (for example during initialization of the available codecs) and then it crashes. Don't do that. Fix what versions you use. Apr 22, 2023 at 9:50
  • Also not surprising it tries to find libx264 – you explicitly --enable-x264. Apr 22, 2023 at 9:51
  • Wait, how can I detect which exact libraries does ./configure found?
    – Daniel
    Apr 22, 2023 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .