将一个raspberry下编译好的可执行文件放在android的system/bin下,修改为777权限,运行,出现下面的错误:

/system/bin/sh: XXX: No such file or directory

这一般是系统的动态链接器与XXX这个程序中的动态链接器的名字或路径不对,在raspberry下执行:

readelf -l 可执行文件名

输出:

Elf file type is EXEC (Executable file)
Entry point 0x9e3c
There are program headers, starting at offset Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
EXIDX 0x016420 0x0001e420 0x0001e420 0x00008 0x00008 R 0x4
PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
INTERP 0x000134 0x00008134 0x00008134 0x00019 0x00019 R 0x1
[Requesting program interpreter: /lib/ld-linux-armhf.so.]
LOAD 0x000000 0x00008000 0x00008000 0x1642c 0x1642c R E 0x8000
LOAD 0x017000 0x00027000 0x00027000 0x01464 0x03c38 RW 0x8000
DYNAMIC 0x01700c 0x0002700c 0x0002700c 0x000f0 0x000f0 RW 0x4
NOTE 0x000150 0x00008150 0x00008150 0x00044 0x00044 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping:
Segment Sections...
.ARM.exidx .interp
.interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame
.init_array .fini_array .jcr .dynamic .got .data .bss
.dynamic
.note.ABI-tag .note.gnu.build-id

其中的

  INTERP         0x000134 0x00008134 0x00008134 0x00019 0x00019 R   0x1
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]
说明了缺少的文件,拷贝到android对应目录即可!
参考:http://bbs.csdn.net/topics/390349057?page=1#post-393513107

android中:/system/bin/sh: : No such file or directory错误的更多相关文章

  1. centos7 ssh 提示/bin/bash No such file or directory 【ldd命令理解】

    现象:客户报障ssh无法登陆.提示/bin/bash No such file or directory 排查:进入单用户模式 linux16 行ro替换 rw init=/sysroot/bin/s ...

  2. CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory

    今天尝试更新了下虚拟机CentOS中的python版本后. 运行“yum”命令,就报错:“sudo: unable to execute /bin/yum: No such file or direc ...

  3. ASMCMD报错解决:sh: /u01/app/11.2.4/grid/bin/clsecho: No such file or directory

    sh: /u01/app/11.2.4/grid/bin/clsecho: No such file or directory 在登录asmcmd时报此错误,尝试解决,刷新oracle_sid也不行 ...

  4. tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory

    将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题: # ./shutdown.sh  Using CATALINA_BASE:   /usr/local/tomcat  ...

  5. tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory(转)

    原文:https://blog.csdn.net/reblue520/article/details/52588825 将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题 ...

  6. linux因勿删或误操作导致登录界面异常,命令无法使用,显示/bin/bash:No such file or directory

    一.故障现象 1.用secure CRT连接服务器时显示: /bin/bash:No such file or directory 翻译成中文是:没有此类文件或目录 2.直接登录服务器执行命令时显示: ...

  7. qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

    执行 qmake -v 出现错误:qmake: could not exec ‘/usr/lib/x86_64-linux-gnu/qt4/bin/qmake’: No such file or di ...

  8. bash: /usr/bin/npm: No such file or directory

    一个整得很烂了的Ubuntu服务器, 各种问题乱出. npm老是升不到最新版(一直显示1.4),于是我干脆删了, 结果再去装却装不上了, 如果用apt-get install npm安装, 就得到如下 ...

  9. sudo: Cannot execute /usr/local/bin/zsh: No such file or directory 问题

    参考:sudo: Cannot execute /usr/local/bin/zsh: No such file or directory 之前在美化Ubuntu的时候,下了个zsh,但是忘记改配置文 ...

随机推荐

  1. 无法定位序数 12384 于动态链接库 mfc90.dll

    场景: 运行 vs2008 编译生成的一个 exe 错误: 无法定位序数 12384 于动态链接库 mfc90.dll 原因: 缺少vc++ 2008 运行库. vcredist 全称Microsof ...

  2. 分享一个MAC下绕开百度网盘限速下载的方法,三步操作永久生效

    相信大家都比较困惑,百度网盘客户端限速后一般只有几十K的下载速度,Windows有百度网盘破解版,但MAC的破解版似乎不存在,要提速的话,一般的做法是开超级会员(27元/月),身为程序员的我们,是不是 ...

  3. OpenStack Keystone架构

    一. Keystone简介 1. OpenStack Keystone简介 2. Keystone安装与部署 2.1 包安装Keystone 2.2 源码安装源码安装 3 配置运行Keystone 3 ...

  4. mybatis 参数为String,用_parameter 取值

    mybatis 参数为String,if test读取该参数代码: <select id="getMaxDepartId" parameterType="java. ...

  5. 【Java集合的详细研究1】Collections类常用方法总结

    1.sort(Collection)方法的使用(含义:对集合进行排序). 例:对已知集合c进行排序? public class Practice { public static void main(S ...

  6. u3d 场景资源打包

    搞了一天终于搞定u3d的场景打包,这样就可以不用修改太多程序,把资源放在外部修改了.好处多多 但是本来很简单的东西搞了一天,google来的说作为场景scene.unity 文件 打包成 unityd ...

  7. iPhone: 在 iPhone app 里使用 UIPopoverController

    更新:iOS8 版本已经不可用 为 UIPopoverController 增加类别,如下: //NSObject+UIPopover_Iphone.h #import <Foundation/ ...

  8. 17 HTTP编程入门

    http请求原理 http请求原理我就不多说了,网上一搜就能搜索到,下面我注意是记录下http模块的使用方法 http 模块 HTTP-server hello world 我们使用HandleFun ...

  9. ubuntu-14.04.2-desktop-i386.iso:ubuntu-14.04.2-desktop-i386:安装Oracle11gR2

    ubuntu 桌面版的安装不介绍. 如何安装oracle:核心步骤和关键点. ln -sf /bin/bash /bin/sh ln -sf /usr/bin/basename /bin/basena ...

  10. Android开发学习笔记-自定义组合控件的过程

    自定义组合控件的过程 1.自定义一个View 一般来说,继承相对布局,或者线性布局 ViewGroup:2.实现父类的构造方法.一般来说,需要在构造方法里初始化自定义的布局文件:3.根据一些需要或者需 ...