Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exec format error 1

Status
Not open for further replies.

NitzGuy

Programmer
Jun 9, 2003
28
CA
Hi,
I am trying to run a file using the exec command but I keep getting.
sh: rpt_view.er: cannot execute binary file
sh: rpt_view.er: exec format error

The command line is
exec rpt_view.er myfile username

I am running redhat linux 7.3

Can anyone help me?

Thanks
Jason
 

What does 'file rpt_view.er' say??
What kind of file is it??

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 

Lots of files are binary, that doesn't make them executable.

Please run the command 'file rpt_view.er'

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Oh, sorry, I didn't realize that.
But this command is in a program that does work (at least it did until I migrated it). Now It causes errors when I try to run those lines of code.

I am really lost with this one.
 

Where did you migrate it to??
The file command is your friend.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
I executed the file command and it says that the file is executable. I think it might be the permissions.
I migrated it form a 4gl application running on a unix server to a 4j's (bdl) application running on linux.

Thanks all your help on this one.
 

Can you please post the full output of the file command??

Binary executables are not usually portable between Unix systems. You have to recompile the code.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Here is the output of the file command.

rpt_view.er: 80386 COFF executable.
 
NitzGuy,
Was this an Informix 4gl program moved from SCO Unix to Linux?

If it is from SCO you might be able to run it under a compatibility mode. From the command line try runing:
Code:
modeprobe binfmt_coff
This will allow you to execute coff binaries in additiona to the native elf bianries.

To be honest I'm not sure if it will work. Infogmix 4gl is very, umm, delicate with regard to it's execution environment. You might be able to download the trial of Informix 9.4 for linux and recompile the program. I don't know if it has the 4gl compiler in it though.

Sorry I don't have any better solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top