目标板上运行程序提示 sh: xx : no such file or directory
2018-02-07 22:26
543 查看
将交叉编译出的可执行程序放到目标板执行,运行时报 “sh: no such file or directory”,那为什么会报错,这是因为执行该bin程序时,找不到对应的依赖文件(一般是xxx.so)解决办法:1、gcc -static -o test test.c 选项将文件编译成静态链接程序,这种方式编译出来的bin文件一般会比较大,好处就是执行时没有额外的依赖文件。2、 使用ldd(交叉编译的话需要用交叉编译工具链的ldd)命令查看,其使用方式如下:# /bin/ldd
相关文章推荐
- Ubuntu16.0.4LTS 64位上运行32位程序,提示No such file or directory?错误的解决办法
- Ubuntu16.0.4LTS 64位上运行32位程序,提示No such file or directory?错误的解决办法
- 嵌入式Linux 执行程序时提示:-sh: No such file or directory
- 运行sh脚本报错:-bash: ./filename.sh: /bin/bash^M: bad interpreter: No such file or directory
- 64位Ubuntu运行32位程序时报文件不存在(No such file or Directory)的一种解决办法
- Android中运行sh脚本提示找不到文件或路径(no such file or directories)
- 解决"运行build.sh的脚本,报 -bash: ./build.sh: No such file or directory 的错误"
- linux可执行文件执行时提示No such file or directory(docker环境中运行的ubuntu镜像)
- 运行sh脚本异常:/bin/sh^M:bad interpreter: No such file or directory的问题
- x86_64运行i868的可运行文件的错误提示(文件存在) bash: ./bin/mysql: No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题
- Linux下执行.sh文件提示No such file or directory
- Linux执行.sh文件时提示No such file or directory
- 交叉编译在目标板上执行helloworld时提示:“No such file or directory”
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux下执行.sh文件提示No such file or directory
- 在Ubuntu 14.04 LTS下使用adb的时候提示adb: No such file or directory ,无法运行使用adb。
- SlickEdit在64bit Ubuntu下运行vsinst安装程序出现"No such file or directory"的解决方法
- Linux运行shell脚本提示No such file or directory错误的解决办法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法