问题背景:
64位的CentOS上运行 /path/to/android/sdk/build-tools/23.0.1/aapt,结果报错:
-bash: /usr/bin/aapt: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
问题原因:
使用file aapt 命令,我们发现 aapt 是32位程序,对了我们的系统可是64位的,看来是缺少32位的运行库造成的:
[root@node1 23.0.1]# file aapt
aapt: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, not stripped
解决方案:
yum install glibc.i686
然后运行又报新错:
error while loading shared libraries: libz.so.1
解决方案:
sudo yum install zlib.i686
然后运行继续报新错:
error while loading shared libraries: libstdc++.so.6
解决方案:
sudo yum install libstdc++.i686