1

This question already has an answer here:

I can't execute a simple executable.

The result of ll

user@user-SATELLITE-C855-169:~/Bureau/Workspace/buildroot/buildroot/output/host/opt/ext-toolchain/bin$ ll
total 16948
drwxr-xr-x 2 user user    4096 avril 18  2014 ./
drwxr-xr-x 8 user user    4096 janv. 18 21:01 ../
-rwxr-xr-x 1 user user  565152 avril 18  2014 armv5-ctng-linux-gnueabi-addr2line*
-rwxr-xr-x 2 user user  589764 avril 18  2014 armv5-ctng-linux-gnueabi-ar*
-rwxr-xr-x 2 user user 1035780 avril 18  2014 armv5-ctng-linux-gnueabi-as*
-rwxr-xr-x 2 user user  624784 avril 18  2014 armv5-ctng-linux-gnueabi-c++*
lrwxrwxrwx 1 user user      28 avril 18  2014 armv5-ctng-linux-gnueabi-cc -> armv5-ctng-linux-gnueabi-gcc*
-rwxr-xr-x 1 user user  563424 avril 18  2014 armv5-ctng-linux-gnueabi-c++filt*

and this is how I execute armv5-ctng-linux-gnueabi-ar

user@user-SATELLITE-C855-169:~/Bureau/Workspace/buildroot/buildroot/output/host/opt/ext-toolchain/bin$ ./armv5-ctng-linux-gnueabi-ar

This gives

No such file or folder

What is meant by the * in the end of each file -- is there something special?

EDIT

Propsed manip by @Arkadiusz Drabczyk:

user@user-SATELLITE-C855-169:~/Bureau/Workspace/buildroot/buildroot/output/host/opt/ext-toolchain/bin$ readelf -a armv5-ctng-linux-gnueabi-ar | grep "Requesting program interpreter:"
  [Requesting program interpreter: /lib/ld-linux.so.2]

Propsed manip by @steeldriver:

user@user-SATELLITE-C855-169:~/Bureau/Workspace/buildroot/buildroot/output/host/opt/ext-toolchain/bin$ arch
x86_64

I am using a 64 bit OS.

user@user-SATELLITE-C855-169:~/Bureau/Workspace/buildroot/buildroot/output/host/opt/ext-toolchain/bin$ file armv5-ctng-linux-gnueabi-ar
armv5-ctng-linux-gnueabi-ar: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=8dac66869f5be2dbb2bee517e289901c4be80db5, stripped

The binary seems to work with a 32 bit architecture ELF 32-bit.

marked as duplicate by Gilles linux Jan 18 '17 at 23:36

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.

  • 1
    Is armv5-ctng-linux-gnueabi-ar a script? If it is, does the first line of the script (with #!) point to an interpreter that actually exists? – Kusalananda Jan 18 '17 at 20:35
  • @Kusalananda, thanks no it's not a script it's an executable. – Mouin Jan 18 '17 at 20:39
  • The ll command that you use is an alias for ls with some flags. One of the flags is probably -F, which adds * to any executable file in the listing. – Kusalananda Jan 18 '17 at 20:43
  • Yes it seems the star come from there – Mouin Jan 18 '17 at 20:46
  • Is your OS 32-bit or 64-bit? does the binary you are trying to run have the same architecture (what does file armv5-ctng-linux-gnueabi-ar say)? – steeldriver Jan 18 '17 at 20:56
1

Any help, what is meant by the * in the end of each file is there sth special?

Your ll alias may contain -F option which adds a character after a file name. From man ls:

   -F, --classify
          append indicator (one of */=>@|) to entries

In many shells such as bash you can check how an alias is expanded using type command. For example, on my system:

$ type ll ll is aliased to 'ls -Alhtr --color'

Now, you said that the file that gives you the error is a binary so it may be due to an incorrect loader. Try what loader it requests and make sure you have it:

$ readelf -a armv5-ctng-linux-gnueabi-ar | grep "Requesting program interpreter:"

If the binary is designated to run on x32 system it will request a x32 interpreter from /lib. If you don't have it will not start. So now, depending on the system you use you need to find a way to add 32-bit compatibility layer to your system. For example, on Ubuntu it's simple - just a single apt-get install will do the job, for Slackware it's described here: http://docs.slackware.com/slackware:multilib .

  • ok thanks i undrestand the meaning of * , however i can't undrestand why when i execute the binary ./armv5-ctng-linux-gnueabi-ar i'am getting no such file or directory – Mouin Jan 18 '17 at 20:51
  • I edit the question this gives /lib/ld-linux.so.2 – Mouin Jan 18 '17 at 21:03
  • ok, so do you have /lib/ld-linux.so.2? Show output of: ll /lib/ld-linux.so.2. – Arkadiusz Drabczyk Jan 18 '17 at 21:04
  • no i don't have. – Mouin Jan 18 '17 at 21:08
  • well, that's your problem. As suggested in the comments by user steeldriver you're probably running x64 operating system and you don't have x32 compatibility layer. Please post output of uname -m command. Do you have /lib directory at all? Do you have /lib64? – Arkadiusz Drabczyk Jan 18 '17 at 21:13

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