I have build tools version 25.0.1 installed on a machine running Enterprise Red Hat Linux, 64 bit. When I try and run the aapt command, from the command line I get the following:

-bash: ./aapt: cannot execute binary file

From researching it looks like the issue is that the aapt executable was compiled for 32 bit. I have tried many suggestions out there to install via yum libs to allow 32 bit executables to run, but none have let aapt run.

Here is the output from file ./aapt

./aapt: Mach-O 64-bit executable

Here is the output from the uname command

3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Any help would be appreciated!

  • What does sudo rpm -q --file ./appt output? Also this maybe be useful to you: en.wikipedia.org/wiki/Mach-O Commented Jan 3, 2017 at 22:19
  • file /ci/android-sdk-linux/build-tools/25.0.1/aapt is not owned by any package Thank you! I manually copied the sdk to the server btw.
    – Flynn81
    Commented Jan 3, 2017 at 22:25

1 Answer 1


./appt is not a ELF formatted executable, it's a Mach-O executable. This format is used on macOS, so evidently you have a macOS executable, not a Linux executable. What does sudo rpm -q --file ./appt output?

You might what to see if there is a version of ./appt available to your system by executing: sudo yum --enablerepos=* provides '*/appt'

  • It could be that the system I download the original files on was OSX. Thank you for the Mach-O suggestion, investigating further.
    – Flynn81
    Commented Jan 3, 2017 at 22:26

You must log in to answer this question.

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