LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-20-2003, 04:29 PM   #1
mkwong107
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: Suse 8.2
Posts: 7

Rep: Reputation: 0
Unhappy Please help!! Problem on running execute file!!


Hi all,
I got a problem on running a binary file on linux. I have tried to run it as root account.
This is a network emulator.

here is my error message:
./network
error msg: "bash: ./network: cannot execute binary file"

OR
strace -e trace=file ./network
error msg: strace: exec: Exec format error
execve("./network", ["./network"], [/* 66 vars */]) = 0

Can anyone help me to run this binary file on the linux?

Thanks your help!!

Alston
 
Old 10-20-2003, 04:49 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
You set the permissions to be an executable file??

chmod +x network
 
Old 10-20-2003, 04:53 PM   #3
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 36
If it wasn't set +x, a permission denied error would be returned...and at any rate, strace doesn't require the file to be +x to run on it.

That plus the phrase that strace gave the error "Exec format error" makes me think that either the file isn't in ELF or a.out format or it somehow got corrupted along the line.
 
Old 10-20-2003, 05:26 PM   #4
mkwong107
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: Suse 8.2
Posts: 7

Original Poster
Rep: Reputation: 0
I did set the chmod a+x for that file.
Actually, this file is working on school enviroment which is solaris, but it got the error message on the linux system.
 
Old 10-20-2003, 05:31 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by mkwong107
I did set the chmod a+x for that file.
Actually, this file is working on school enviroment which is solaris, but it got the error message on the linux system.
That would most likely be your problem then.. and giving this type of information before would have been nice, really, it would have.

Edit and change your script or executable to run on Linux.. that will solve your problems. Linux isn't Solaris..
 
Old 10-20-2003, 05:35 PM   #6
mkwong107
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: Suse 8.2
Posts: 7

Original Poster
Rep: Reputation: 0
is that mean there is no way to run this binary file if i don't have the source file?
 
Old 10-20-2003, 05:37 PM   #7
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 36
Well, there are emulators (I believe...check freshmeat), but Solaris uses a different binary format than Linux.
 
Old 10-20-2003, 05:42 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by mkwong107
is that mean there is no way to run this binary file if i don't have the source file?
If its an executable that uses libs and what not that are also compatible or available with Linux, you can install the dependencies or the such to use on Linux.

What exactly is this binary file? Any particular program to be exact? If it is a popular type program, there could be a port of it already available on Linux.

More details gets better responses.
 
Old 10-20-2003, 05:46 PM   #9
mkwong107
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: Suse 8.2
Posts: 7

Original Poster
Rep: Reputation: 0
http://www.act-cs.com/download/network

about is the link to download the binary file. Actually, i want to provide this link before, but i cannot post a URL link before 5 posted. And i don't know how to describe it. Sorry for my lack of explanatioan
 
Old 10-20-2003, 05:47 PM   #10
mkwong107
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: Suse 8.2
Posts: 7

Original Poster
Rep: Reputation: 0
the link should be: http://www.actsci-cs.com/download/network

sorry for typing error
 
Old 10-20-2003, 05:56 PM   #11
mkwong107
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: Suse 8.2
Posts: 7

Original Poster
Rep: Reputation: 0
here is the detail for this file

Network Emulator Program (network):
You will be given the executable code for the network emulator. To run it, you need to supply the following parameters in the given order:
" emulator's receiving UDP numbers in the forward (sender) direction,
" receiver s network address and receiving UDP port number,
" emulator's receiving UDP numbers in the backward (receiver) direction,
" sender s network address and receiving UDP port number, " maximum delay of the link in units of millisecond,
" packet discard probability, " verbose 1/0 for Yes/No (Set to 1, the network emulator will output its internal processing).
When the link emulator receives a packet from the sender, it will discard it with the specified probability; otherwise, it stores the packet in its buffer. With a random amount of delay (less than the specified maximum delay), it then forward the packet to the receiver.

network 9991 host1 9994 9993 host3 9992 1 0.2 0
 
Old 10-20-2003, 05:59 PM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
To tell you the truth, that link you gave is basically just a directory index and then the file download. It doesn't provide anything beyond that.

Being an executable and or binary file, I would presume you will need to contact the creator or developer of this file to find out if you can get it to work on Linux.

Regards.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
execute .el file balloon Linux - Software 2 11-16-2004 06:02 AM
how to execute .sh file sagar Linux - Software 4 11-05-2004 06:21 PM
Problem when using crontab to execute a .php file doublesheep Linux - General 3 06-10-2004 08:46 AM
Please help!! Problem on running execute file!! mkwong107 Linux - General 0 10-20-2003 04:21 PM
Problem running execute binary file zekko Linux - General 18 08-08-2003 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration