LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 01-16-2006, 03:01 AM   #1
jared78
Member
 
Registered: Mar 2005
Distribution: Red Hat 9.0
Posts: 94

Rep: Reputation: 15
Thumbs up Python upgradation,setting compiler $PATH


Hello all,
I use RH 9.0.
I m trying to upgrade my python from 2.2.2 to 2.4.2 version.

I have downloaded the new version.
In the Python 2.4.2 folder, ./configure gives my this error:

checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH

Earlier I had upgraded my gcc using apt-get.
How do I find the location of gcc and set the path?

thanks in advance..
Jared
 
Old 01-16-2006, 03:15 AM   #2
redsnapper
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
you can use this comand :
#whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz

if gcc is not in your path type
# export PATH=$PATH:/usr/bin/
 
Old 01-16-2006, 03:52 AM   #3
jared78
Member
 
Registered: Mar 2005
Distribution: Red Hat 9.0
Posts: 94

Original Poster
Rep: Reputation: 15
whereis gcc does not return anything..
[root@localhost root]# whereis gcc
gcc:

this is what I get...
can I check out anything else?

thanks,
Jared
 
Old 01-16-2006, 07:56 PM   #4
jared78
Member
 
Registered: Mar 2005
Distribution: Red Hat 9.0
Posts: 94

Original Poster
Rep: Reputation: 15
Any clues as to how do I find my gcc and set the $PATH?

thanks,
Jared
 
Old 01-19-2006, 01:08 AM   #5
jared78
Member
 
Registered: Mar 2005
Distribution: Red Hat 9.0
Posts: 94

Original Poster
Rep: Reputation: 15
Can anyone help me on how do I set my $PATH?
 
Old 01-19-2006, 02:08 AM   #6
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 30
Hi,

What did you apt-get, exactly? Are you sure the upgrading of gcc worked?

Try to run gcc. First running "gcc", then writting gcc and pressing tab before Enter. It's possible that only the symlink is missing.

What Debian-based distro are you using? Debian itself? Which one?
 
Old 01-19-2006, 07:38 AM   #7
jared78
Member
 
Registered: Mar 2005
Distribution: Red Hat 9.0
Posts: 94

Original Poster
Rep: Reputation: 15
I was saying that I upgraded to current gcc version to 3.2.2 from the earlier 2.96 using apt-get.

As I said in my first post,
./configure gives me an error saying no compiler found in $PATH.

I am using Red Hat 9.0

thanks,
Jared
 
Old 01-19-2006, 07:47 AM   #8
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 30
Sorry, I missed the part about RedHat (yet I cannot find where you said that you went from gcc 2.96 to gcc 3.2.2).

What does it happen when you write in the console gcc and press the TAB key twice (not pressing Enter)?? You see: sometimes the compiler is called gcc-XYY and because the symlink gcc->gcc-XYY is not created, the system thinks there is not gcc compiler. So maybe your path is set correctly, but you have to create the symlink by hand.

You can also try this command. In the root directory (/): find -iname "gcc*". If apt-get succeeded, then you should see a gcc executable in the list (the list may be long, tho).

What's the output of echo $PATH?
 
Old 01-19-2006, 08:43 PM   #9
jared78
Member
 
Registered: Mar 2005
Distribution: Red Hat 9.0
Posts: 94

Original Poster
Rep: Reputation: 15
thanks for the tips.
Here are the three outputs for your pointers.

1.gcc <tab><tab> shows this two files
gcc296 gccmakedep

2.Looks like the excutable is /usr/bin/gcc296

3./usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/jared/bin

Should I conclude the executable is gcc296?
If yes how do I set the $PATH?

thanks,
Jared
 
Old 01-20-2006, 12:12 AM   #10
redsnapper
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
export PATH=$PATH:/usr/bin/gcc296

its case sensitive !!
call all your envirement variables :
#env
print a variable
#echo $PATH
 
  


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
C compiler is not in PATH Lycoming360 Linux - Software 1 12-04-2005 04:47 PM
how to install C compiler in $PATH? hari78 Linux - Newbie 5 03-02-2005 07:39 AM
No C compiler found in $path dstjames Linux - Newbie 1 11-17-2004 09:36 AM
Path to C compiler? BajaNick Programming 2 09-24-2003 12:04 AM
Perl or Python to C++ compiler JHuizingh Programming 0 07-16-2002 11:36 AM


All times are GMT -5. The time now is 12:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration