Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed a program on linux (UBUNTU), I set the environment variables. Unfortunately when I type the command to start the program it gave me the Message: No such a file or directory.

I can see the file, its permission is set to be executable. I can't see why?

I installed this program on Mac and windows before and this never happened! :( Here is the link to the software http://www2.parc.com/isl/groups/nltt/xle/doc/xle.html#sec1.5

Here is more info : it is 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

As you can see the enviroment variable properly set as it knows where to look for the xle command but ..

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

Exectung the command 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
share|improve this question

migrated from stackoverflow.com Jan 6 '12 at 5:43

This question came from our site for professional and enthusiast programmers.

3  
What program? What are you trying to do? Can we see something that shows your error in the terminal? Give us at least an ls -la | grep <filename>. –  Makoto Jan 6 '12 at 1:27
    
How are you running it? Does ./programname work? If so and programname doesn't then maybe . isn't in your PATH. –  LaceySnr Jan 6 '12 at 1:28
    
The question is updated! I tried ./xle still the same error! –  Yasaman Jan 6 '12 at 1:35
    
@Makoto -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 –  Yasaman Jan 6 '12 at 1:58
    
@sarnold Done! COuld you have a look at it? –  Yasaman Jan 6 '12 at 1:59

1 Answer 1

up vote 7 down vote accepted

:~/Desktop$ xle
bash: /home/yasaman/Desktop/XLE/bin/xle: No such file or directory

This clearly shows that the file is on your PATH, and has execute permissions.

The most frequent cause of ENOENT error under these conditions is a missing or corrupt dynamic loader. The not a dynamic executable error from ldd is another indication that that's what's happening.

When a kernel execves a dynamic executable, it doesn't actually run the executable itself. Instead, it runs the dynamic loader, and the loader actually arranges for the executable to start, after mapping all required shared libraries.

What does readelf -l xle say? Does the path specified in INTERP segment exist? Is it executable?

Since the file is a 32-bit ELF executable, are you perhaps on a 64-bit only system? If so, you'll need to install libc6-i386 package.

share|improve this answer
    
Thanks It goes one step forward! It seems I need more packages to install I update the question by the output of the "readelf -l xle" and then install that package you mentioned now the error is: xle: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory –  Yasaman Jan 6 '12 at 4:54
    
Awesome, many thanks for explaining something I only vaguely recalled and began to wonder if I even imagined it. :) –  sarnold Jan 6 '12 at 5:29
    
"It seems I need more packages ..." -- that's correct. Now you need 32-bit libX11 (and will likely need several more). You might try to look for 64-bit xle packages instead. –  Employed Russian Jan 6 '12 at 6:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.