免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9080 | 回复: 3
打印 上一主题 下一主题

[急]sh运行问题 ELF: command not found?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-12-20 16:58 |只看该作者 |倒序浏览
我的系统是AS3,运行某些sh(proftpd,httpd)出现
line 1: ELF: command not found
但还是可以运行。


使用runscript xxx
script "xxx" line 20: unknown ommand "."
但20行是
. /etc/rc.d/init.d/functions
应该没有错。

请问问题出在那里?ELF又是什么??

论坛徽章:
0
2 [报告]
发表于 2004-12-20 17:17 |只看该作者

[急]sh运行问题 ELF: command not found??

Copy from:  http://www.xfocus.net/articles/200109/260.html
最初,UNIX系统实验室(USL)开发和发布了Executable and linking Format
(ELF)这样的二进制格式。在SVR4和Solaris 2.x上,都做为可执行文件默认的
二进制格式。ELF比a.out和COFF更强大更灵活。结合一些适当的工具,程序员
使用ELF就可以在运行时控制程序的流程。


★2 ELF类型

三种主要的ELF文件类型:

.可执行文件:包含了代码和数据。具有可执行的程序。
    例如这样一个程序
   
    # file dltest
    dltest: ELF 32-bit LSB executable, Intel 80386, version 1,
        dynamically linked (uses shared libs), not stripped

.可重定位文件:包含了代码和数据(这些数据是和其他重定位文件和共享的
    object文件一起连接时使用的)
    例如这样文件

    # file libfoo.o
    libfoo.o: ELF 32-bit LSB relocatable, Intel 80386, version 1,
       not stripped

.共享object文件(又可叫做共享库):包含了代码和数据(这些数据是在连接
    时候被连接器ld和运行时动态连接器使用的)。动态连接器可能称为
    ld.so.1,libc.so.1 或者 ld-linux.so.1。
    例如这样文件
   
    # file libfoo.so
    libfoo.so: ELF 32-bit LSB shared object, Intel 80386, version
    1, not stripped

ELF section部分是非常有用的。使用一些正确的工具和技术,程序员就能
熟练的操作可执行文件的执行。

     确认支持ELF,运行所需得库是否达到要求。

论坛徽章:
0
3 [报告]
发表于 2004-12-21 02:13 |只看该作者

[急]sh运行问题 ELF: command not found??

原帖由 "wayjam" 发表:
Copy from:  http://www.xfocus.net/articles/200109/260.html
最初,UNIX系统实验室(USL)开发和发布了Executable and linking Format
(ELF)这样的二进制格式。在SVR4和Solaris 2.x上,都做为可执行文件默认的
二..........


明白是明白,但什样才可以搞定这个问题??

论坛徽章:
0
4 [报告]
发表于 2004-12-21 09:19 |只看该作者

[急]sh运行问题 ELF: command not found??

.  filename [arguments]
       source filename [arguments]
              Read  and  execute  commands  from filename in the current shell environment and return the exit status of the last command  exe-cuted from filename.  If filename does not ontain a slash, file names in PATH are used to find the  directory  containing  file-name.   The  file  searched  for in PATH need not be executable.
              When bash is  not  in  posix  mode,  the  current  directory  is searched  if no file is found in PATH.  If the sourcepath option to the shopt builtin command is turned  off,  the  PATH  is  not searched.   If any arguments are supplied, they become the posi-tional parameters when  filename  is  executed.   Otherwise  the  positional  parameters  are unchanged.  The return status is the status of the last command exited within the  script  (0  if  no commands  are  executed),  and false if filename is not found or  cannot be read.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP