LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do i install gcc from a tar.bz2 file when i have no C/C++ compiler installed (http://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-install-gcc-from-a-tar-bz2-file-when-i-have-no-c-c-compiler-installed-659982/)

sagitalk 08-02-2008 03:04 PM

how do i install gcc from a tar.bz2 file when i have no C/C++ compiler installed
 
hello , i'm new to linux..i have installed Red Hat Linux Enterprise Edition 5 on my PC....but only the basic installation has been done so i have no software packages installed......i want to install gcc so that i can start writing C/C++ programs....i downloaded a tar.bz2 file which i extracted and have now got a folder....i am not understanding as to how do i proceed further with the installation......there is a html document that states a lengthy procedure for installation which i could not understand......pl guide me......
regards,
sagitalk

lazlow 08-02-2008 03:14 PM

You cannot do it that way. You have to have a compiler in order to compile.

RH is based on rpms. Yum is the package manager for RHEL5. So " yum install gcc " (as root) should get you started.

sagitalk 08-02-2008 03:16 PM

thank u i will begin right way but will get back in case of a problem

rahilmaknojia 08-02-2008 03:17 PM

You can get gcc++ from ur cds or DVD, if u have created yum server then u can type command "yum install gcc*"

sagitalk 08-02-2008 03:18 PM

Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
No Match for argument: gcc
Nothing to do


this is the message i got after typing the yum install gcc command

sagitalk 08-02-2008 03:20 PM

i do not have any CD/DVD for this........i have extracted the tar.bz2 file and there is a lenghty installation process which requires configuration, build, testing and final install....but reading the file is proving to be of no use

sagitalk 08-02-2008 03:23 PM

what exactly is yum and how will it help me install a C/C++ compiler

lazlow 08-02-2008 03:35 PM

Ok, from post number 5, it is showing that you have not registered you install with RH. You do understand that RHEL requires you to pay for a subscription?

Ok there are three main ways to installs software. 1. compile it(but you need a compilers to compile). 2. Some (mostly RH based) systems use rpms to install binary packages. 3. Some (Debian based) systems use debs to install binary packages. The short answer is that debs and rpms are just two ways of doing the same thing.

Debs and rpms both use repos(repositories) of software on remote servers (and their mirros) to store their software. The vast majority of software an ordinary user will require is in these repos (Thunderbird, FF, OOoffice, gcc/gcc++, etc). Currently RHEL uses yum to access those repos. So "yum install software_package" is how one generally installs software.

rahilmaknojia 08-02-2008 03:55 PM

The error u found is that you dont have RH subscription you have to register to rhn.redhat.com or use CentOS its same as rhel5 no diff just logos are diff and you can get any updates.

rahilmaknojia 08-02-2008 03:59 PM

Quote:

Originally Posted by sagitalk (Post 3234521)
i do not have any CD/DVD for this........i have extracted the tar.bz2 file and there is a lenghty installation process which requires configuration, build, testing and final install....but reading the file is proving to be of no use

Go to command prompt then go to directory where u have extracted ur file then run ./configure then after completed this run make then make install it will work

TITiAN 08-02-2008 06:01 PM

Quote:

Originally Posted by rahilmaknojia (Post 3234547)
Go to command prompt then go to directory where u have extracted ur file then run ./configure then after completed this run make then make install it will work

no it won't >_>
dito (he doesn't have a compiler [needed for the *.tar.bz2] to begin with)

marsques 08-02-2008 07:30 PM

Couldn't he just download the gcc rpm package from the CentOS site and install it?

sagitalk 08-03-2008 01:10 AM

hello, thank you all for the prompt replies.......but i am still confused as to how do i install a C/C++ compiler....is there something that is already compiled and i can copy it to my PC and get started with C/C++ is there a C/C++ in any other format which may help my case....pl do let me know

lazlow 08-03-2008 01:25 AM

Yes. rpms are already compiled. You can register your RHEL and get it from RH via yum. You can switch the repos and use Centos' rpm. You can look through Centos' repo and install it (the rpm) manually.

rahilmaknojia 08-03-2008 01:36 AM

As I told you download CentOS its same as RH only logos are different and very thing like services are same as RH, if u dont blive I was the one who used RH the switch to CentOS bcoz of subscription, So go ahead and download CentOS.


All times are GMT -5. The time now is 06:09 PM.