0

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 – Red Cricket Jan 3 '17 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 Jan 3 '17 at 22:25
2

./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 Jan 3 '17 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.