Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-25-2008, 11:58 PM   #1
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.

Old 10-26-2008, 01:57 AM   #2
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
And what have you done other than post here? What were the results of the actions you've taken?
Old 10-26-2008, 01:12 PM   #3
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:

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

./ 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, 01:29 PM   #4
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
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 01:31 PM.


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 11:28 PM
Assembly, "bash: ./exit: cannot execute binary file" User Name. Programming 4 08-07-2007 10:09 AM
[SOLVED] Installind Slamd64-current. "cannot execute binary file" message about installpkg BrutalMusic Slackware - Installation 1 05-11-2006 10:35 AM
"cannot execute binary file" when install j2sdk jin007 Linux - Software 3 06-27-2005 03:05 PM
SIN linux native - "cannot execute binary file" darkranger Linux - Games 1 06-07-2005 09:34 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration