Ld-lsb-x86-64.so.3 ELF interpreter


I am trying to build a flatpak container for some proprietary software. I use org.freedesktop.Sdk/21.08 as a runtime. Everything goes fine, until some binary executable (provided with the software) is refused to being executed during the build procedure.

Probably, the reason is the following. The binary has /lib64/ld-lsb-x86-64.so.3 as an ELF interpreter instead of usual /lib64/ld-linux-x86-64.so.2:

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-lsb-x86-64.so.3, for GNU/Linux 2.6.9, stripped

Usually, /lib64/ld-lsb-x86-64.so.3 is just a symbolic link to /lib64/ld-linux-x86-64.so.2 in Linux, but it is completely missed in the base runtime filesystem, and I cannot create the symbolic link during build process.

What is the correct way to overcome this issue?

Use patchelf

patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 PATH_TO_EXECUTABLE

See patchelf packaging here.