Chinaunix首页 | 论坛 | 博客
  • 博客访问: 28662
  • 博文数量: 8
  • 博客积分: 177
  • 博客等级: 入伍新兵
  • 技术积分: 85
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-08 19:53
文章分类

全部博文(8)

文章存档

2012年(8)

我的朋友

分类: LINUX

2012-11-13 15:48:05

bin/sh: hello :not found

      奋战半月有余,终于建起了开发平台,以第一个“Hello World”入门程序开始,兴奋之余却遇到bin/sh: hello :not found拦路虎,郁闷啊~~~网上说法云云,改了kernel,又改rootfs,瞎忙一通无济啊,不过还是被我的鼠眼瞄到了,嘿嘿~~~

Build Options->

Build BusyBox as a static binary (no shared libs)

Build with Large File Support (for accessing file>2GB)

如 果选择 Build BusyBox as a static binary (no shared libs) 方式进行编译时,所需的库已经与程序静态地链接在一起,这些程序不需要额外的库就可以单独运行,但是自己编写的程序在文件系统上运行必须采用静态编译,否 则会报诸如:bin/sh: hello :not found的错误。

静态编译如:

arm-linux-gcc –static hello.c –o hello

在开发板上直接./hello,便会有你要的惊喜~~~bin/sh: hello :not found    -sh: ./hello: not found - solylee - SorinLee的博客

转载出处:


阅读(1290) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~