Android: cannot execute file compiled through Linux Deploy on the same phone

后端 未结 1 1593
无人共我
无人共我 2021-01-15 01:10
root@hammerhead:/data/local # ./HelloWorld
tmp-mksh: ./HelloWorld: No such file or directory

Hello!

I compiled using gcc on Linux Deploy, w

相关标签:
1条回答
  • 2021-01-15 01:13

    You should compile your binary with gcc '-static' key. If you don't do that, you binary will need dynamic linker ld.so that doesn't exist on Android (but definitely exists inside your chroot!). This implies that strange error message "No such file or directory".

    0 讨论(0)
提交回复
热议问题