My OS is CentOS 32-bit.
I want to extract the package with 7-zip, install 7-zip with rpm without error. but when I extract the NDK package,it doesn't work. like this:
[root@localhost ~]# ls
anaconda-ks.cfg jni-test
android-ndk-r10e-linux-x86.bin p7zip-9.20.1-1.el5.rf.i386.rpm
install.log p7zip-plugins-9.20.1-1.el5.rf.i386.rpm
install.log.syslog
[root@localhost ~]# 7z x android-ndk-r10e-linux-x86.bin
7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
Processing archive: android-ndk-r10e-linux-x86.bin
Error: Can not open file as archive
According to Google's official document operation:
[root@localhost ~]# ll
总用量 307344
-rw-------. 1 root root 1096 6月 25 17:41 anaconda-ks.cfg
-rwxr-xr-x. 1 root root 309844799 6月 25 21:24 android-ndk-r10e-linux-x86.bin
-rw-r--r--. 1 root root 9119 6月 25 17:41 install.log
-rw-r--r--. 1 root root 3091 6月 25 17:41 install.log.syslog
drwxr-xr-x. 2 root root 4096 6月 25 20:04 jni-test
-rw-r--r--. 1 root root 4455529 4月 20 2011 p7zip-9.20.1-1.el5.rf.i386.rpm
-rw-r--r--. 1 root root 382577 4月 20 2011 p7zip-plugins-9.20.1-1.el5.rf.i386.rpm
[root@localhost ~]# ./android-ndk-r10e-linux-x86.bin
7-Zip SFX 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
Processing archive: ./android-ndk-r10e-linux-x86.bin
Error: Can not open file as archive
Archive Errors: 1
[root@localhost ~]# file android-ndk-r10e-linux-x86.bin
android-ndk-r10e-linux-x86.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, stripped
Why?
UPDATE: The cause of this problem is that the MD5 value is not the same.
If it's 7zip format package, you can extract it with 7zip. But it is not, you can see the format from the
file
command.From the output result above, we can see that it's a ELF executable, so just add the executable bit and execute it.
It will extract to the directory
android-ndk-r10e
under current directory.