LinuxQuestions.org
Help answer threads with 0 replies.
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-27-2006, 08:25 AM   #1
LinuxNewbie999
Member
 
Registered: Oct 2006
Distribution: FreeBSD
Posts: 162

Rep: Reputation: 30
GCC compiler help!!


ftp://ftp.nctu.edu.tw/computer-langu...4.1.1-20060517


I want to download the latest gcc fron this site. but it show a lot of gcc-4.1.1-20060517.tar.bz2
gcc-4.1.1-20060517.tar.gz

There is so many of them. I want a C++ compiler, Which one i should download?
 
Old 10-27-2006, 08:31 AM   #2
ebasi
Member
 
Registered: Jul 2004
Distribution: Slackware 13.0
Posts: 49

Rep: Reputation: 15
There is no difference between
gcc-4.1.1-20060517.tar.bz2
gcc-4.1.1-20060517.tar.gz
Just the type of used archive.
Chose one of them.
there is difference when extracting
Code:
tar jxpvf gcc-4.1.1-20060517.tar.bz2
or
Code:
tar zxpvf gcc-4.1.1-20060517.tar.gz
 
Old 10-27-2006, 08:33 AM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You do know those are source packages, right? As such, you'll need to build them first (which obviously requires a compiler). It would be easier to get a pre-built package for your distro and install that.
 
Old 10-31-2006, 06:27 AM   #4
LinuxNewbie999
Member
 
Registered: Oct 2006
Distribution: FreeBSD
Posts: 162

Original Poster
Rep: Reputation: 30
I need to pre-built them? but how ? or where can i get the pre-built package ?
 
Old 10-31-2006, 12:14 PM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Your distro should have packages available via its package manager (or on the CDs/DVD).
 
Old 10-31-2006, 03:19 PM   #6
whk
Member
 
Registered: Jun 2005
Posts: 200

Rep: Reputation: 35
BTW, did you check your distro on your console with
]$ gcc --version
If somthing like
gcc (GCC) 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
shows
you have it.
 
Old 11-01-2006, 09:11 PM   #7
LinuxNewbie999
Member
 
Registered: Oct 2006
Distribution: FreeBSD
Posts: 162

Original Poster
Rep: Reputation: 30
when i type "which gcc" terminal say " No gcc"
 
Old 11-01-2006, 09:54 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You need to install it then, obviously. Again, your distro should have a package for it that you can install.
 
Old 11-02-2006, 05:14 AM   #9
LinuxNewbie999
Member
 
Registered: Oct 2006
Distribution: FreeBSD
Posts: 162

Original Poster
Rep: Reputation: 30
I already tar gcc-4.1.1 , then i type which gcc again. Still... no gcc
Before that, i already have a gcc folder in /usr/lib when i install Fedora5.
when i type "which gcc", this is what terminal show /usr/bin/which: no gcc in (/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6:/home/pang/bin)

What does it mean?
 
Old 11-02-2006, 05:58 AM   #10
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You haven't installed the gcc package.
 
Old 11-02-2006, 06:11 AM   #11
LinuxNewbie999
Member
 
Registered: Oct 2006
Distribution: FreeBSD
Posts: 162

Original Poster
Rep: Reputation: 30
hmm.. what is gcc package? i need to download another file ? how do i install the package?
 
Old 11-02-2006, 06:22 AM   #12
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
You start by telling which distro you're using. Is it the Fedora Core 5?
Then the command should be like "rpm -i gcc" to install the gcc package though I think it uses the yum... but I haven't used it in a while so someone more knowledgeable should tell the correct command.

the command 'which gcc' searches for program gcc from your PATH which is a list of folders where the linux will search for programs.

You can't install the gcc-4.1.1.tar.bz2 as it is the source code and it needs to be compiled before you can use it and to compile binary packages you need to have gcc installed... see where I'm getting at

Only way is to install binary package which is already compiled for your distro.
 
Old 11-03-2006, 12:03 AM   #13
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
This is a chicken and egg situation. The tarball you loaded contains the source for the gcc compiler. You need the gcc compiler to compile it. Your distro should have a gcc package which will install the precompiled binary.

I would recommend using that version since you may need to update a lot of dependencies.
 
  


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
no gcc, no cc no c compiler pyrether DamnSmallLinux 5 09-09-2006 01:14 AM
gcc compiler canyon289 Linux - Software 3 10-23-2004 10:22 PM
GCC compiler .. pashupathinath Programming 1 10-21-2004 12:20 PM
GCC compiler aviceda Linux - Newbie 5 08-13-2004 06:55 AM
GCC compiler...? ph0tik Linux - Newbie 4 04-22-2003 03:22 PM


All times are GMT -5. The time now is 04:36 PM.

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