LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-04-2004, 07:05 AM   #1
GiaCo
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Rep: Reputation: 0
Can Linux execute binary files?


Hi there, I know this is probably a really silly question, but I am extremely new to Linux. I am using Fedora Core 2, and when I try to run a program I have downloaded, I am being told that Linux cannot execute the binary file? Is this a problem with this specific program, or is it a common fact that linux does not execute binary files??

Any help would be hugely appreciated!!
 
Old 11-04-2004, 07:19 AM   #2
Haiyadragon
Member
 
Registered: Sep 2003
Location: Gorredijk, Netherlands
Distribution: Arch Linux
Posts: 400

Rep: Reputation: 30
What kind of file is it? With what command did you try to execute it? You can try "sh <filename>" or "chmod +x <filename>" and then "./<filename>".
 
Old 11-04-2004, 07:21 AM   #3
GiaCo
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Original Poster
Rep: Reputation: 0
it's a program called ilatex, for converting files into latex. i chmod it to be777, then tried ./ilatex and got the error message that it could not execute a binary file. Is this a common occurance in Linux or is it just a problem with this program?

Thanks for your help
 
Old 11-04-2004, 07:23 AM   #4
bahramH
Member
 
Registered: Apr 2004
Location: France
Distribution: Mandrake
Posts: 67

Rep: Reputation: 15
executable programs are often in binary format, but not every binary file is a program. A tiff image file for example is in binary format. "Binary" means just "not text file" .
If the file you have downloaded is indeed an executable (by linux) binary file, then the problem is most probably its access
"rights". Each file under unix has three different rights : read, write and execute. And these rigths are defined for three diffrent classes of people : the owner, people in the same "group", and all the others. you can check the access rights of a file by typing "ll" or "ls -l".
To be short, if you want to restore the "execution" rights of a file for everybody, just type :

chmod uog+x filename

look in the man for details about access rights.
 
Old 11-04-2004, 07:31 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Is this a linux program that you downloaded? Type the command:
file ilatex

This will give you information on what kind of file it is.

Here is an example on my computer:
/bin/mv: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), not stripped

That was a linux binary.

~> file /windows/c/Program\ Files/iTunes/iTunes.exe
/windows/c/Program Files/iTunes/iTunes.exe: MS Windows PE 32-bit Intel 80386i GUI executable

This one is a Windows binary.

Here is a link to the iLatex download page just in case you downloaded the wrong file.
http://www.cse.iitk.ac.in/users/isci...ds.html#ilatex

Last edited by jschiwal; 11-04-2004 at 07:36 AM.
 
Old 11-04-2004, 07:31 AM   #6
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
Linux does in fact execute binary files (it would be a pretty useless system if it didn't).
Linux also executes text files (scripts).

However, unlike Windows, Linux executables (be they text or binary) need to have the execute permission enabled on the file.

If you downloaded the file, chances are, it's saved without the x bit set, so you need to enable it before executing:

eg chmod +x the_file_name

Note however, it's a bad idea to blindly execute files you downloaded without first verifying it free of malware. Especially when you're logged in as root.
If you
 
Old 11-04-2004, 08:17 AM   #7
GiaCo
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Hi, thanks so much for all of your replies. You're right it is a windows executable file. I went to that link, do i have to download all three fles? I tried that, and i am still getting error messages when I try to run them, I know I probably sound so stupid but I just cant get my head around Linux!!

Should i just use the rpm command on the two rpm files and then try to execute the other file?

thanks,
 
Old 11-04-2004, 03:29 PM   #8
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
The first link for each program on that downoads page is the RPM package version. This is the one you want to install. Install it like any other RPM (if you don't know how to install RPM's, learn how. It's how you install most programs). According to the man file they provide (under documentation), it's a simple command line program. There's no graphical component. You don't click on a file or anything. You type "ilatex [ -options... ] infile [-o outfile]" into a shell. Read the man file yourself for more details on how to use it (type "man ilatex" into a terminal).

The second link on that page is an RPM for the source code. You can tell by the .src in the file name. You don't really need it unless you want to compile the program yourself, and I don't get the impression that you want to do that. I'm not sure what the third links are for, but they're probably for use by Slackware and similar distros. They're compressed tgz files in any case. You probably don't want to fool with those either.

I don't see anything on that page, or indeed on that whole site, that looks like a Windows file. I mean, it's all about Indian language support on Linux. Why would there be a Windows version? Windows programs almost always have an .exe extension. If it doesn't end in .exe it's probably not a Windows file.

BTW, just for your information, there's a project called Wine which is dedicated to getting Windows applications to run on Linux. At this point some programs work, but many others don't. As you can guess, it's a complex problem, and it's going to be some time before everything works. See here for more. http://www.winehq.com/

Last edited by David the H.; 11-04-2004 at 03:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Execute Binary rightsidedown Linux - Software 8 05-10-2011 01:41 AM
SIN linux native - "cannot execute binary file" darkranger Linux - Games 1 06-07-2005 09:34 AM
AIX: cannot execute binary files felixweimann AIX 2 11-19-2004 02:40 PM
Cannot execute binary file??? Wimpie22 Linux - General 3 01-11-2004 05:38 PM
cannot execute binary file.... ttaylor Linux - General 4 10-02-2001 02:37 AM


All times are GMT -5. The time now is 10:27 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration