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
.
1 Answer 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 gettingno such file or directory
Mouin– Mouin2017年01月18日 20:51:57 +00:00Commented Jan 18, 2017 at 20:51 -
I edit the question this gives
/lib/ld-linux.so.2
Mouin– Mouin2017年01月18日 21:03:18 +00:00Commented Jan 18, 2017 at 21:03 -
ok, so do you have
/lib/ld-linux.so.2
? Show output of:ll /lib/ld-linux.so.2
.Arkadiusz Drabczyk– Arkadiusz Drabczyk2017年01月18日 21:04:05 +00:00Commented Jan 18, 2017 at 21:04 -
-
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– Arkadiusz Drabczyk2017年01月18日 21:13:27 +00:00Commented Jan 18, 2017 at 21:13
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?ll
command that you use is an alias forls
with some flags. One of the flags is probably-F
, which adds*
to any executable file in the listing.file armv5-ctng-linux-gnueabi-ar
say)?