0

I got an ELF file of type ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped which I want to run in a normal regular linux machine (not a container)

Sadly I get the error No such file or directory when trying to execute.

I eventually want to debug said ELF and it will be harder to do in a container.

Was googling for hours and couldnt find a simple solution.

Daniel Cohen
  • 163
  • 1
  • 7

2 Answers2

2

ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped

This binary is linked to use musl libc, which is not installed on your system.

No such file or directory

This error is slightly confusing. What's missing is not your binary, but the iterpreter (/lib/ld-musl-x86_64.so.1) which it requires.

It may be possible to install musl in parallel with existing GLIBC, though I didn't find a definitive yes/no answer.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
0

musl is used to compile portable static binaries. Something went wrong with the compilation of the program you are trying to run. The flag '--static' should have been passed to the program that was compiled, which would result in a

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped

An example on how to compile such a program:

CC=musl-gcc CFLAGS="--static" ./Configure
make
Ren Hoek
  • 23
  • 6