我在linux主机用arm-linux-gcc编译后,复制到开发板根目录运行,出现/bin/sh: ./hello not found
2012-01-12 16:22
453 查看
原因是:
板子上没有运行程序所需要的库,查看所需要的库的方法是readelf -a hello | grep NEEDED,
出来的内容就是需要的库,确保你的开发板上有这些库。
解决方法:
方法1、 把这些所需要的库拷贝到板子上,保证板子上找得到。
方法2、 编译的时候使用静态编译,arm-linux-gcc -o hello hello.c -static
板子上没有运行程序所需要的库,查看所需要的库的方法是readelf -a hello | grep NEEDED,
出来的内容就是需要的库,确保你的开发板上有这些库。
解决方法:
方法1、 把这些所需要的库拷贝到板子上,保证板子上找得到。
方法2、 编译的时候使用静态编译,arm-linux-gcc -o hello hello.c -static
相关文章推荐
- 交叉编译环境以及开发板上-/bin/sh: ./hello: not found(使用arm-linux-gcc -static -o 来进行静态编译)
- 怎么解决/bin/sh: arm-linux-gcc: not found make
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- linux2.6.30.4内核移植(6)——移植应用程序hello world常见的错误:-bin/sh ./hello not found
- qt编译过程中出现错误:arm-linux-g++ could not found
- MISP版本嵌入式QT编译时出现mips-linux-gcc command not found
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法(转)
- 关于Cygwin中编译FFmpeg时执行sh文件出现arm-linux-androideabi-gcc is unable to create an executable file.
- -bin/sh ./hello not found,程序运行不了,库文件不对应
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- OK6410开发板android系统boot编译—/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc:命令未找到
- 安装交叉编译工具,执行arm-linux-gcc–v命令出现提示找不到该文件或目录?解决方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 关于在开发板上运行程序显示“-bin/sh:/XXX not found”的解决方法
- 交叉编译boa后在开发板运行boa出现-/bin/sh: boa: not found 错误的解决方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 安装交叉编译工具,执行arm-linux-gcc –v命令出现提示找不到该文件或目录?解决方法
- 交叉编译错误make: arm-none-linux-gnueabi-gcc:命令未找到 /bin/sh: 1: arm-none-linux-gnueabi-gcc: not found问题解决