File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Cannot execute binary file on linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Cannot execute binary file on linux" Watch "Cannot execute binary file on linux" New topic
Author

Cannot execute binary file on linux

Nazneen Shaikh
Greenhorn

Joined: May 01, 2003
Posts: 21
Hi,

I am trying to install weblogic 8.1 sp3 on linux box. When i try to execute the binary distribution i get an error stating "cannot execute binary file".

The permissions on the file are fine. I tried doing it as root also, but just cant get it.

Any clues, ideas?

Thanking in Advance,
Naz
Petr Blahos
Ranch Hand

Joined: Apr 28, 2004
Posts: 131
What does

say?
P.


Get a better web browser:<br /><a href="http://www.mozilla.org/products/firefox/switch.html" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/switch.html</a>
Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
Maybe the file was corrupted during download. See if the website provides an md5sum of the file and then check the md5sum of your download to see if they match.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

"cannot execute binary file" doesn't look like a message for a corrupted download.

Try

and Petrs tip, and perhaps


http://home.arcor.de/hirnstrom/bewerbung
Frank Hale
Ranch Hand

Joined: Mar 25, 2000
Posts: 230
He said the permissions on the file were fine which leads me to think that the binary may be corrupt or he is simply trying to execute a file that isn't meant to be executed. I'd go back and recheck everything, just to be sure.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
This error may also mean that the binary file was not compiled for your particular platform. Are you really running Linux or is it Solaris, BSD, or something else? If you are sure it's Linux, what distribution are you using?

Layne


Java API Documentation
The Java Tutorial
Patrick Mallahan
Ranch Hand

Joined: Apr 22, 2005
Posts: 69
I downloaded the file like 5 times and it still will not execute ! Here is my input/output:

[root@localhost downloads]# sh ./j2eesdk-1_4_01_2005Q1-linux.bin
./j2eesdk-1_4_01_2005Q1-linux.bin: ./j2eesdk-1_4_01_2005Q1-linux.bin:
cannot execute binary file
[root@localhost downloads]# chmod +x j2eesdk-1_4_01_2005Q1-linux.bin
[root@localhost downloads]# sh ./j2eesdk-1_4_01_2005Q1-linux.bin
./j2eesdk-1_4_01_2005Q1-linux.bin: ./j2eesdk-1_4_01_2005Q1-linux.bin:
cannot execute binary file
[root@localhost downloads]# ldd ./j2eesdk-1_4_01_2005Q1-linux.bin
libpthread.so.0 => /root/downloads/../lib/libpthread.so.0 (0xb7598000)
libdl.so.2 => /root/downloads/../lib/libdl.so.2 (0xb7595000)
libcrypt.so.1 => /root/downloads/../lib/libcrypt.so.1 (0xb7568000)
libresolv.so.2 => /root/downloads/../lib/libresolv.so.2 (0xb7557000)
libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
(0xb7501000)
libm.so.6 => /root/downloads/../lib/libm.so.6 (0xb74de000)
libc.so.6 => /root/downloads/../lib/libc.so.6 (0xb73aa000)
libgcc_s.so.1 => /root/downloads/../../lib/libgcc_s.so.1 (0xb73a1000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)
[root@localhost downloads]#
[ May 12, 2005: Message edited by: Patrick Mallahan ]
Patrick Mallahan
Ranch Hand

Joined: Apr 22, 2005
Posts: 69
oh yea, and I am on Redhat ES3
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I am unable to verify this prior to responding, but why are you envoking the Bourne shell interpretor(sh)?

Have you tried the following:
Patrick Mallahan
Ranch Hand

Joined: Apr 22, 2005
Posts: 69
it gives me a segmentation fault error
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
How did you install the JDK?

Did you use the RPM or the self-extracting binary?
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Try installing by using the comman-line interface:

To run the installation program that uses the command-line interface, at the command prompt type the name of the bundle file followed by the -console option:
./bundle_filename -console

Patrick Mallahan
Ranch Hand

Joined: Apr 22, 2005
Posts: 69
using a binary and -console still didnt work.

if i could get an RPM for J2EE i would.
[ May 12, 2005: Message edited by: Patrick Mallahan ]
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I don't know if this is helpful or not. But I downloaded the same binary file and attempted the install process. It worked fine for me, I aborted the installation process after the Install Wizard GUI appeared(I already have J2SE installed).

By the way, RH9 is my operating system.



So, there must be something not right with your operating system.
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Or maybe try installing the packages seperatety.

Do you already have the J2SE installed?

If not install the bundles seperately:
1. J2SE (RPM or self-extract binary)
2. J2EE (self-extract binary)
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Originally posted by Patrick Mallahan:
I downloaded the file like 5 times and it still will not execute ! Here is my input/output:

(...)
[root@localhost downloads]# ldd ./j2eesdk-1_4_01_2005Q1-linux.bin


Fine.
What did 'file j2eesdk-1_4_01_2005Q1-linux.bin' show?

And I like to mention again: I heard so often the advice, to download a second time, and about the probability of corrupt downloads, and from people, downloading multiple times without foreign advice.
And I never heard from a case where it solved a problem.

AFAIK ftp and tcp/ip use checksums to almost guarantee a valid download.
Interrupted downloads leave a 'file.part' instead of 'file' in my download-dir, but of course your programs may differ.

I read about a 'cannot execute binary file' problem, where the kernel didn't supported the (deprecated) a.out format, so if 'file xy' gives you a response like 'a.out binary' instead of 'elf-binary', this could be a hint, but I don't know, whether ldd would have worked, if this file is really of
a.out-format.
Patrick Mallahan
Ranch Hand

Joined: Apr 22, 2005
Posts: 69
Last i checked Redhat ES3 was basicaly RH9. But I installed 1.3 and it worked so i dont know what it is.
 
Don't get me started about those stupid light bulbs.
 
subject: Cannot execute binary file on linux