LinuxQuestions.org
Review your favorite Linux distribution.
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 10-25-2008, 10:58 PM   #1
jason_zhang
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
None of the compliers working, a "can not execute binary file" problem


Hi, all,

My gcc, g++ and gfortran compliers stopped work today. Whenever and what ever I asked them to day anything, it always says "can not execute binary file!"

I am on Suse 10.2, in BASH, and have been desperately trying to solve the problem for meeting a deadline. Could someone help me as soon as possible?

Thanks in advance for any help.

Jason
 
Old 10-26-2008, 12:57 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
And what have you done other than post here? What were the results of the actions you've taken?
 
Old 10-26-2008, 12:12 PM   #3
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Rep: Reputation: 32
A compiler does not execute binary files! It, hopefully, creates them, but executing them is something that is not done by the compiler. Compilation of a c++ programme with g++ is as follows:

Code:
g++ -o prog prog.cpp
where prog is the binary created and prog.cpp is the source. Executing it means that you have to type

Code:
./ prog
in the right directory, where prog is. If prog is in your $PATH, then you can simply type prog in the console in any directory.
 
Old 10-26-2008, 12:29 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,073

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
When describing a problem, post *exactly* what did you do, and paste the results. Otherwise, we have to guess things which is sometimes a waste of time because we might guess the wrong thing.

If you mean that running gcc produces that error, then I guess that either your compilers or/and your glibc are broken or incompatible, in which case a reinstallation of the whole toolchain will be needed to restore the compilers functionality.

If you mean that the binaries produced by gcc are producing that error, then the problem might be that you are not using gcc the right way. A common mistake that some people often make is to compile the final binary using -c, which compiles, but doesn't produce a working executable file because it doesn't link against the needed libs.

PS: In the first case, I would also try to run fsck from a livecd. Maybe the problem has to do with file system corruption.

Last edited by i92guboj; 10-26-2008 at 12:31 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
why does it says "afile:cannot execute binary file" littletransformer Programming 7 12-01-2007 10:28 PM
Assembly, "bash: ./exit: cannot execute binary file" User Name. Programming 4 08-07-2007 09:09 AM
[SOLVED] Installind Slamd64-current. "cannot execute binary file" message about installpkg BrutalMusic Slackware - Installation 1 05-11-2006 09:35 AM
"cannot execute binary file" when install j2sdk jin007 Linux - Software 3 06-27-2005 02:05 PM
SIN linux native - "cannot execute binary file" darkranger Linux - Games 1 06-07-2005 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration