我在 linux (UBUNTU) 上安装了一个程序,我设置了环境变量。不幸的是,当我键入启动程序的命令时,它给了我消息:没有这样的文件或目录。
我可以看到该文件,其权限设置为可执行。我不明白为什么?
我之前在 Mac 和 Windows 上安装过这个程序,但从未发生过!:( 这是软件的链接http://www2.parc.com/isl/groups/nltt/xle/doc/xle.html#sec1.5
这是更多信息:它是 XLE!
**~/XLE/bin$ ls**
approx-rand-sigtest lexbase unpack
client-server-support.tcl mt-sigtest unpack-counts
cometc node_label_rules.pl variables.tcl
commands.tcl pdb xfr_benchmark.tcl
default-gen-tokenizer.fst print-feature-forest xfr_exe
default-morph-config select-best-parse xfr-extract-feature-list
default-parse-tokenizer.fsmfile semantics.tcl xfr_main
dummy_translate_rules.pl sp-3.12.0 xfr-print-feature-forest
extract sp-3.12.2 xfr-select-n-best
foreign_language_interface transfer xle
fs_triples.pl transfer.sav xledate.tcl
fstructures.tcl transfer.tcl xle-inspector.tcl
gen.tcl translate.tcl xle.tcl
getProperSubsets trees.tcl xle-unix.tcl
gtags triples xle-win.tcl
identify-sparse-features triples_match
:~/Desktop$ xle
bash: /home/yasaman/Desktop/XLE/bin/xle: No such file or directory
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,环境变量设置正确,因为它知道在哪里查找 xle 命令,但是 ..
yasaman@yasaman-desktop:~$ $PATH
bash: /home/yasaman/Desktop/XLE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: No such file or directory
yasaman@yasaman-desktop:~/Desktop/XLE/bin$ file ./xle ; ldd ./xle
./xle: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
not a dynamic executable
yasaman@yasaman-desktop:~/Desktop/XLE/bin$ ls -la | grep xle
-rwxrwxr-x 1 yasaman yasaman 5050490 2010-11-05 08:27 xle
-rw-rw-r-- 1 yasaman yasaman 32 2010-11-05 08:27 xledate.tcl
Run Code Online (Sandbox Code Playgroud)
执行命令 readelf -l xle
Elf file type is EXEC (Executable file)
Entry point 0x8059ccc
There are 7 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1
[Requesting program interpreter: /lib/ld-linux.so.2]
LOAD 0x000000 0x08048000 0x08048000 0x42fd85 0x42fd85 R E 0x1000
LOAD 0x430000 0x08478000 0x08478000 0x18598 0x61534 RW 0x1000
DYNAMIC 0x44751c 0x0848f51c 0x0848f51c 0x00128 0x00128 RW 0x4
NOTE 0x000128 0x08048128 0x08048128 0x00020 0x00020 R 0x4
GNU_EH_FRAME 0x423980 0x0846b980 0x0846b980 0x0168c 0x0168c R 0x4
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame .gcc_except_table
03 .data .dynamic .ctors .dtors .jcr .got .bss
04 .dynamic
05 .note.ABI-tag
06 .eh_frame_hdr
Run Code Online (Sandbox Code Playgroud)
小智 8
:~/Desktop$ xle
bash: /home/yasaman/Desktop/XLE/bin/xle: No such file or directory
这清楚地表明该文件在您的 上PATH,并且具有执行权限。
ENOENT在这些情况下,最常见的错误原因是动态加载程序丢失或损坏。在not a dynamic executable从错误ldd是另一个迹象表明,这是发生了什么。
当内核成为execve动态可执行文件时,它实际上并不运行可执行文件本身。相反,它运行动态加载器,加载器实际上会在映射所有必需的共享库后安排可执行文件启动。
什么readelf -l xle发言权?INTERP段中指定的路径是否存在?它是可执行的吗?
由于该文件是 32 位ELF可执行文件,您是否可能仅在 64 位系统上?如果是这样,您将需要安装libc6-i386包。
| 归档时间: |
|
| 查看次数: |
2702 次 |
| 最近记录: |