Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Possible Duplicate:
“No such file or directory” lies on Optware installed binaries

I am currently trying to get some piece of hardware to work on an embedded device. One part of the driver is an executable, which has to be started to get the hardware to work. However when I try to execute it I get

bash: no such file or directory

I have checked and the file is definitely there, executable etc. I looked around online and I found that this could also be related to a problem between the architecture for which the file has been compiled and the one I am using. However I cannot find anything wrong. Here is some of the diagnostics I have run:

root@desktop:~# /usr/local/eGTouchARMwithX/eGTouchD
bash: /usr/local/eGTouchARMwithX/eGTouchD: No such file or directory
root@desktop:~# ls -l /usr/local/eGTouchARMwithX/eGTouchD
-rwxr-xr-x 1 root root 198870 Jul 19 14:11 /usr/local/eGTouchARMwithX/eGTouchD
root@desktop:~# file /usr/local/eGTouchARMwithX/eGTouchD 
/usr/local/eGTouchARMwithX/eGTouchD: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
root@desktop:~# uname -a
Linux desktop 3.2.0-1415-omap4 #20-Ubuntu SMP PREEMPT Mon Jun 18 19:03:59 UTC 2012 armv7l armv7l armv7l GNU/Linux
root@desktop:~# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, BuildID[sha1]=0x1266f80916e3e59eb001459610510f5d05630297, stripped
root@desktop:~# ldd /usr/local/eGTouchARMwithX/eGTouchD
        not a dynamic executable

The only hint I have is that file reports this file as a dynamically linked executable, whereas ldd reports it as not being a dynamic executeable.

Any ideas what could be wrong with the file and how to fix this?

share|improve this question

marked as duplicate by Gilles, Mat, Renan, Stéphane Gimenez, warl0ck Sep 8 '12 at 1:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3  
Is the partition mounted with executable permission? –  Marco Jul 19 '12 at 14:12
    
@Marco: yes, the partition is mounted just fine. Other binaries on the same partition can be executed without any trouble. –  LiKao Jul 20 '12 at 9:05
add comment

2 Answers 2

up vote 3 down vote accepted

Although the architecture is the same, and this message commonly indicates that the binary is for a foreign architecture, the real meaning of this message is that it's linked against an incompatible C runtime library.

See this message on the Linux From Scratch website. In his case upgrading glibc gave him this error for several (but not all) commands.

You'll need to install the proper C runtime library that matches the binary or get a binary that matches your C runtime library.

share|improve this answer
add comment

This can come from any mismatch in libc when using shared libraries (specifically the ld.so a.k.a dynamic loader) Very common when using shared uclibc on a glibc box or vice versa. I would recommend using a generic static toolchain until you get a working native shared one. http://landley.net/aboriginal has a bootstrap toolchain for several architectures prebuilt.

share|improve this answer
add comment

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