I have a file called commanKT
and want to run it in a Linux terminal. Can someone help by giving the command to run this file? I tried ./commonRT
but I
your compilation option -c makes your compiling just compilation and assembly, but no link.
To execute a binary or .run file in Linux from the shell, use the dot forward slash friend
./binary_file_name
and if it fails say because of permissions, you could try this before executing it
chmod +x binary_file_name
# then execute it
./binary_file_name
Hope it helps
The volume it's on is mounted noexec
.
:-) If not typo, why are you using ./commonRT
instead of ./commonKT
??
To execute a binary, use: ./binary_name
.
If you get an error:
bash: ./binary_name: cannot execute binary file
it'll be because it was compiled using a tool chain that was for a different target to that which you're attempting to run the binary on.
For example, if you compile 'binary_name.c' with arm-none-linux-gnueabi-gcc
and try run the generated binary on an x86 machine, you will get the aforementioned error.
Or, the file is of a filetype and/or architecture that you just cannot run with your hardware and/or there is also no fallback binfmt_misc entry to handle the particular format in some other way. Use file(1)
to determine.