LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-01-2005, 02:17 PM   #1
hari78
Member
 
Registered: Dec 2004
Distribution: FC3, RH enterprise 3
Posts: 46

Rep: Reputation: 15
how to install C compiler in $PATH?


whenever i give ./configure command to insall any tar.gz file, the following message appears in konsole
no acceptable cc found in $PATH
plz help on what to do
i am using Mandrake 10.0
thanks in advance
 
Old 03-01-2005, 02:22 PM   #2
draxen
Member
 
Registered: Nov 2004
Posts: 43

Rep: Reputation: 15
Do you have a compiler (development packages) installed?
 
Old 03-01-2005, 02:40 PM   #3
dwight1
Member
 
Registered: Feb 2005
Posts: 42

Rep: Reputation: 15
Try the following, if you're using a bash shell:

whereis cc

or

whereis gcc

If it finds that, make certain that the directory is in your PATH environment variable. You can check this out via: echo $PATH

If the directory isn't in your PATH, you can add it via:

export PATH=$PATH:/usr/local/bin

Here we're adding /usr/local/bin to the path, assuming that cc is in there.

Another possibility is that configure is only looking for gcc, and you only have cc installed. To solve that, try:

CC=/usr/local/bin/gcc ./configure

Or you can make a symlink between gcc and cc
 
Old 03-01-2005, 11:41 PM   #4
hari78
Member
 
Registered: Dec 2004
Distribution: FC3, RH enterprise 3
Posts: 46

Original Poster
Rep: Reputation: 15
installing gcc

thanks a lot for your replies
is the installation of gcc sufficient to have ccomplier ?
but while trying to install gcc i get the following message:
./configure
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /home/har/gcc-3.3.2 using "mt-frag"
./configure: line 8: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
please help me on what to do
as i am new to linux, i am not able to follow things well
thanking you
 
Old 03-01-2005, 11:51 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
It seems odd, but you need an existing C compiler to compile gcc (it's written mostly in C itself). If you have no compiler, you'll need to install ready compiled binaries. You should be able to find a gcc package on your distro's install media. If you're having trouble tell us which diostro (sorry if it's posted and I missed it) and we'll help you further,
 
Old 03-02-2005, 07:39 AM   #6
draxen
Member
 
Registered: Nov 2004
Posts: 43

Rep: Reputation: 15
On Mandrake, you should install a RPM package from the installation CD, and NOT try to compile it by hand.
Easiest way to do it is open Mandrake Control Center, find an icon for Add/Remove Software, find gcc in the list, select it, and the program will install it for you.
 
  


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
compiler in path problem rjshirts Linux - Software 4 01-11-2005 11:25 AM
No C compiler found in $path dstjames Linux - Newbie 1 11-17-2004 09:36 AM
I'm just trying to install Gaim... "no acceptable C compiler found in $PATH jimothy05 Mandriva 2 09-30-2004 02:10 AM
How do i put a C compiler in my $PATH BajaNick Programming 4 10-08-2003 03:33 AM
Path to C compiler? BajaNick Programming 2 09-24-2003 12:04 AM

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

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