LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installation and environment set for gcc (https://www.linuxquestions.org/questions/linux-newbie-8/installation-and-environment-set-for-gcc-719645/)

bineet 04-16-2009 02:07 PM

Installation and environment set for gcc
 
can anyone tell me how to set environment for gcc also how to install it

thanks

maresmasb 04-16-2009 02:51 PM

Use a package manager to install gcc (something like yum or apt or yast) and it will set everything correctly. Setting an environment variable is actually done on a shell or within a script, like:
export MY_VAR="param"
and can be displayed by
echo $MY_VAR

Add it to your .profile or .bashrc or whatever startup script is read by your distro.

I never had the need to set any environment params for gcc when installed properly. Only LD_LIBRARY_PATH needs to be set locally sometimes in some cases.

bineet 04-17-2009 10:51 AM

thank you

but i need more expalanation on this i m bigneer to redhat.

john test 04-17-2009 02:15 PM

Code:

s# which gcc
/usr/bin/gcc

if you type which gcc as above and gcc in already installed it will display as above
if not
Code:

$ apt-get install gcc
Should install it.

What environmental variable do you want to set? Can you provide further explanation of what you need to accomplish with the variable?

r3sistance 04-17-2009 04:08 PM

Quote:

Originally Posted by bineet (Post 3512315)
i m bigneer to redhat.

If your using something red hat based then with root privilages type "yum install gcc". If it's something else, state the actual distro, differen distros use different package managers, red hat only really uses yum where something like debian or ubuntu use apt-get.

For editting .bashrc just type nano ~/.bashrc

bineet 04-18-2009 01:25 AM

thank you all, i appreciate all of your help.


All times are GMT -5. The time now is 11:14 PM.