LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   getting error 'cannot execute binary file' (https://www.linuxquestions.org/questions/linux-newbie-8/getting-error-%27cannot-execute-binary-file%27-802264/)

kapilbajpai88 04-15-2010 03:22 PM

getting error 'cannot execute binary file'
 
Hi,

I am trying to install a program using 32 bit installer over 32 bit Debian machine. While trying ./installer name getting an error 'cannot execute binary file'.

I checked the library files required
I checked permissions
I checked the JRE
I checked md5sum for the installer
and I checked the size of the file which matches with the file on the website.

Can somebody help regarding this.

Thank you in advance.

Regards,
Venkat

Tinkster 04-15-2010 03:30 PM

What does
Code:

file ./installer
ldd ./installer

tell you about it?


Cheers,
Tink

Didier Spaier 04-15-2010 03:33 PM

Check that the installer file begin with a "shebang" like this :
Code:

#!/bin/bash
If not, add that as the first line.

Or start the installer this way
Code:

sh installer

kapilbajpai88 04-15-2010 03:49 PM

[QUOTE=Tinkster;3936857]What does
Code:

file ./installer
ldd ./installer

tell you about it?


Cheers,
Tink[/QUOTE

here is the output of the commands

$ file ./genespringGX_linux32.bin
./genespringGX_linux32.bin: Bourne shell script text executable
$ ldd ./genespringGX_linux32.bin
not a dynamic executable
$

kapilbajpai88 04-15-2010 03:52 PM

Quote:

Originally Posted by Didier Spaier (Post 3936863)
Check that the installer file begin with a "shebang" like this :
Code:

#!/bin/bash
If not, add that as the first line.

Or start the installer this way
Code:

sh installer

I am sorry but I could not understand the first part of your answer.

Thank you

Tinkster 04-15-2010 03:53 PM

Quote:

Originally Posted by kapilbajpai88 (Post 3936881)
Quote:

Originally Posted by Tinkster (Post 3936857)
What does
Code:

file ./installer
ldd ./installer

tell you about it?


Cheers,
Tink

here is the output of the commands

$ file ./genespringGX_linux32.bin
./genespringGX_linux32.bin: Bourne shell script text executable
$ ldd ./genespringGX_linux32.bin
not a dynamic executable
$

In that case Didiers advice should work for you :}

Unless the embedded executable is not "quite right".

kapilbajpai88 04-15-2010 04:06 PM

Quote:

Originally Posted by Tinkster (Post 3936889)
In that case Didiers advice should work for you :}

Unless the embedded executable is not "quite right".

Hi Tinkster,

We are not getting the first part of Didier's advice, as we don't know where to check for 'shebang' thing in the installer.

Is there anything else that can be traced so that we can make things working ?

Thakn you.

MTK358 04-15-2010 04:13 PM

See the wikipedia page for "shebang".

Didier Spaier 04-15-2010 04:13 PM

The system should know what to do with the installer.

The fact that the file begin with #!/bin/bash inform the system that this file is a "bash script", that is to say a set of commands to be executed or "interpreted" by the program "bash". Thus it starts "bash", giving it the name of the file to be executed.

When you type "sh genespringGX_linux32.bin" you instruct bash to do the same.

There can be subtle differences between the "sh" and the "bash" programs but that probably doesn't matter in your case.

To make sure, you can open the installer file genespringGX_linux32.bin with a text editor and check that it do begin with a line with #!/bin/bash. (or maybe #!/bin/sh)

kapilbajpai88 04-15-2010 04:33 PM

Quote:

Originally Posted by Didier Spaier (Post 3936910)
The system should know what to do with the installer.

The fact that the file begin with #!/bin/bash inform the system that this file is a "bash script", that is to say a set of commands to be executed or "interpreted" by the program "bash". Thus it starts "bash", giving it the name of the file to be executed.

When you type "sh genespringGX_linux32.bin" you instruct bash to do the same.

There can be subtle differences between the "sh" and the "bash" programs but that probably doesn't matter in your case.

To make sure, you can open the installer file genespringGX_linux32.bin with a text editor and check that it do begin with a line with #!/bin/bash.


Thank you for your reply.
in the bin file(genespringGX_linux32.bin) the first line starts with #!/bin/sh
will this be any problem?
will this

Didier Spaier 04-15-2010 04:37 PM

Quote:

Originally Posted by kapilbajpai88 (Post 3936933)
Thank you for your reply.
in the bin file(genespringGX_linux32.bin) the first line starts with #!/bin/sh
will this be any problem?

Probably not.

Please type :
Code:

sh genespringGX_linux32.bin
and tell us what the outcome is.

umeshkr 09-20-2010 03:35 AM

cannot execute binary file

jdkaye 09-20-2010 04:10 AM

Quote:

Originally Posted by umeshkr (Post 4103107)
cannot execute binary file

Are you running this as root? Some installation files require that.
ciao,
jdk

sag47 09-20-2010 04:16 AM

The last time I had "cannot execute binary file" it had to do with how my drive was mounted in fstab (with the noexec option even with chmod 755).

Modify /etc/fstab and go to where your drive is which is being used. Add the exec option to the fstab entry for the partition which you are attempting to run the executable. If you do not know how to modify your /etc/fstab then run the following commands:
Code:

cat /etc/fstab
ls -lah /dev/disk/by-uuid
df

And post the output of those commands here on LQ. We will be happy to assist you with correctly modifying your fstab file. Also having the full path of the executable which you are trying to run will be a big help so please provide that as well.

You may encounter problems running the second two commands so run them as root or precede them with the sudo command in Ubuntu (e.g. sudo df).

SAM

Didier Spaier 09-20-2010 05:28 AM

Hello,

my bet is that the installer you used, though it has the label "32 bit", in fact includes 64 bit binaries - you wouldn't be the first, as I did find out with Google's help.

I just downloaded GeneSpring GX 11 (32 bit version) from the Agilent technologies website and had no problem installing it on Slackware-13.1, even though this distribution be not officially supported.

Here is the link to the 32 bit version:
http://www.chem.agilent.com/cag/bsp/...GX_linux32.bin

And the link to the download page:
http://www.chem.agilent.com/en-US/Pr...s/gp34727.aspx

When you launch the application for the first time it asks for a license number... I didn't go as far as getting one, just to try an application I don't need ;)

Remember to make the installation as a regular used (not as root), as requested.

Good luck,

PS Don't be fooled by the fact that the installer's file name is the same as yours. It seems that Agilent don't include the installer's version in its name. And don't forget to make that file executable before using it (chmod +x genespringGX_linux32.bin)


All times are GMT -5. The time now is 12:11 PM.