filmov
tv
Unix & Linux: ./executable: cannot execute binary file (2 Solutions!!)

Показать описание
Unix & Linux: ./executable: cannot execute binary file
The Question: I have a script that works well when I ssh to the server to execute it myself,
runs it.
I am automating tests on an embedded linux system (the target). The target is
connected to Server A (RHEL 5) via serial and operated over minicom. Server B
(FC 12) builds the tests that actually run on the target, and can ssh to Server
A. Server C (RH) hosts Hudson, with Server B as a slave.
everything needed on the actual target; it boots the image, mounts a directory
from Server B and executes the tests. A bash script on Server B invokes minicom
with the runscript script along with some companion actions. I have a bash
script on Server B which uses
to get those tests run on the target. I am on Server C, I can get those tests
run by ssh'ing to Server B and executing the script that ssh's to Server A
which executes minicom with runscript. Whew. To review:
Server A: Hudson uses its slave mechanism to ssh to Server B.
ttyE1
Target, after booting: Mounts a directory from Server B, where the tests are,
and enters that directory. It invokes yet another bash script, which runs the
tests, which are compiled C executables.
Now, when I execute any of these scripts myself, they do what they should.
However, when Hudson tries to do the same thing, over in the minicom session it
complains about a line in the "yet another bash script" that invokes the C
executable, ./executable, with ./executable: cannot execute binary file
I still have a lot to learn about linux, but I surmise this problem is a result
of Hudson not connecting with a console. I don't know exactly what Hudson does
to control its slave. I tried using the line export TERM=console in the
Can anyone explain to me what is happening and how I can fix it? I cannot
remove any of the servers from this equation. It may be possible to take
minicom out of the equation but that would add an unknown amount of time to
this project, so I'd much prefer a solution that uses what I already have.
Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful
The Question: I have a script that works well when I ssh to the server to execute it myself,
runs it.
I am automating tests on an embedded linux system (the target). The target is
connected to Server A (RHEL 5) via serial and operated over minicom. Server B
(FC 12) builds the tests that actually run on the target, and can ssh to Server
A. Server C (RH) hosts Hudson, with Server B as a slave.
everything needed on the actual target; it boots the image, mounts a directory
from Server B and executes the tests. A bash script on Server B invokes minicom
with the runscript script along with some companion actions. I have a bash
script on Server B which uses
to get those tests run on the target. I am on Server C, I can get those tests
run by ssh'ing to Server B and executing the script that ssh's to Server A
which executes minicom with runscript. Whew. To review:
Server A: Hudson uses its slave mechanism to ssh to Server B.
ttyE1
Target, after booting: Mounts a directory from Server B, where the tests are,
and enters that directory. It invokes yet another bash script, which runs the
tests, which are compiled C executables.
Now, when I execute any of these scripts myself, they do what they should.
However, when Hudson tries to do the same thing, over in the minicom session it
complains about a line in the "yet another bash script" that invokes the C
executable, ./executable, with ./executable: cannot execute binary file
I still have a lot to learn about linux, but I surmise this problem is a result
of Hudson not connecting with a console. I don't know exactly what Hudson does
to control its slave. I tried using the line export TERM=console in the
Can anyone explain to me what is happening and how I can fix it? I cannot
remove any of the servers from this equation. It may be possible to take
minicom out of the equation but that would add an unknown amount of time to
this project, so I'd much prefer a solution that uses what I already have.
Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful