Register a domain and help support LQ
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 09-21-2008, 01:29 AM   #1
LQ Newbie
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
Unable to compile and run a C program in fedora

I hav fedora fc8 installed in my pc. I have written a simple C program in fedora terminal. Saved it as syscall.c. I tried to compile my program using cc and gcc commands like gcc syscall.c. But i got the error displaying bash: cc command not found. The same error turned up when i used gcc command. Similarly ./a.out command also returned the same error. how to rectify this and get my C programs compiled and exected?
Old 09-21-2008, 01:54 AM   #2
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
you need to have gcc installed. Easiest way to check is to:

gcc --version

If not, check out and install it.

Hope this helps a little.
Old 09-21-2008, 02:26 AM   #3
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
yum install gcc
... or ...
yum install gcc-c++
... or even ...
apt-get install gcc-c++
Old 09-22-2008, 12:10 PM   #4
Registered: May 2008
Posts: 97

Rep: Reputation: 20
Originally Posted by paulsm4 View Post
Forgive me but does Fedora come with apt-get ? I had only seen yum which is the default package manager in Fedora.


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
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 04:56 AM
Unable to run add or remove program shivsankarr Linux - Newbie 3 11-21-2007 12:07 AM
How Do I Run/Compile a Program Written in C? debsan Fedora 2 05-25-2006 03:58 PM
How to compile and run my first program vanhelsing Programming 2 07-11-2004 03:41 PM
how to compile and run c program under mandrake 9.2 ?? mschua44 Mandriva 7 02-26-2004 12:13 PM

All times are GMT -5. The time now is 06:05 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