I am trying to run a binary file (./elastix) in the terminal but I am getting the following error

/Users/tony/Desktop/elastix-4.9/bin/elastix: cannot execute binary file

When I type the command file elastix I get

elastix: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, BuildID[sha1]=d13c10b0fe409ac66c2733ea6efb1cfb175b4070, not stripped

and when I type uname -m I get:


So it seems like my system and the file are compatible which is why I'm confused. Perhaps it has to do with not striped?

  • This is on a Mac, isn’t it? Commented May 29, 2019 at 13:10

1 Answer 1


From your /Users/tony path, I’m guessing you’re trying to do this on a Mac. The binary you have is a Linux binary and won’t work on your macOS system.

You need to either find a macOS binary, or run your Linux binary in a Linux VM, or build your own macOS binary.

  • if I compiled it myself would it work on my machine? There is no Mac binary available. Also, could you recommend a tutorial of some kind on how to link to a VM. I'm relatively new to shell. Commented May 29, 2019 at 13:24
  • Indeed, that would work. Commented May 29, 2019 at 13:27

You must log in to answer this question.

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