Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-16-2009, 02:07 PM   #1
LQ Newbie
Registered: Apr 2009
Posts: 8

Rep: Reputation: 0
Post Installation and environment set for gcc

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

Old 04-16-2009, 02:51 PM   #2
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
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.

Last edited by Tinkster; 10-30-2010 at 03:14 PM.
Old 04-17-2009, 10:51 AM   #3
LQ Newbie
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
thank you

but i need more expalanation on this i m bigneer to redhat.
Old 04-17-2009, 02:15 PM   #4
john test
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
s# which gcc
if you type which gcc as above and gcc in already installed it will display as above
if not
 $ 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?
Old 04-17-2009, 04:08 PM   #5
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Originally Posted by bineet View Post
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

Last edited by r3sistance; 04-17-2009 at 04:10 PM.
Old 04-18-2009, 01:25 AM   #6
LQ Newbie
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
thank you all, i appreciate all of your help.


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
GCC in Mixed Environment popowich Solaris / OpenSolaris 2 03-02-2009 03:35 PM
yum install gcc doesn't set the lastest gcc ver 4.3.x kim,jw Linux - Newbie 3 12-22-2008 11:51 PM
Set environment salmanucit Linux - Software 1 01-04-2006 03:50 AM
I've installed gcc, how do i build a complier environment? Derek-kun Linux - Newbie 4 09-23-2003 09:50 PM
gcc environment variables Itzac Linux - Software 1 03-25-2003 11:13 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration