LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-10-2011, 03:07 AM   #1
asiddique2u
LQ Newbie
 
Registered: Sep 2011
Location: bangalore
Distribution: ubuntu, centos
Posts: 28

Rep: Reputation: Disabled
I need help in installing gcc compiler.


HI,
I am using CentOS on virtual box(windows 7). I have installed CentOS using iso image so I dont have gcc compiler as default.
I am unable to connect to internet through command line so can't use yum command although I am able to connect through firefox.
So, Please help me with steps to install gcc compilers and other related packages.
Regards.
 
Old 10-10-2011, 03:10 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
It would be better to solve the network issue, so that you can easily install the gcc compiler and eventually the base development tools in one step. Maybe are you behind a proxy? What is the exact error message from yum?
 
Old 10-10-2011, 03:17 AM   #3
asiddique2u
LQ Newbie
 
Registered: Sep 2011
Location: bangalore
Distribution: ubuntu, centos
Posts: 28

Original Poster
Rep: Reputation: Disabled
I haven't tried using yum. can u please tell me that command for me to try.
I am facing problem in configuring auto proxy configuration setting (found in firefox or IE) on terminal. I have changed network proxy settings in System but still not able to connect.
 
Old 10-10-2011, 04:00 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Ok. First you have to enable yum to use proxy. Edit the file /etc/yum.conf and add the following line into the [main] section:
Code:
proxy=http://username:password@yourproxy:8080/
where you have to set the credentials, the exact domain name of the proxy server and the port number (if different from 8080). Once you have correctly set-up the proxy server, you can either install gcc using
Code:
yum install gcc
or the entire Development Tools group:
Code:
yum groupinstall "Development Tools"
 
Old 10-10-2011, 04:15 AM   #5
asiddique2u
LQ Newbie
 
Registered: Sep 2011
Location: bangalore
Distribution: ubuntu, centos
Posts: 28

Original Poster
Rep: Reputation: Disabled
I am using LAN to connect to the internet. I dont have the direct proxy server information rather i have a site which sends proxy server information. Do we have any feature like receiving proxy settings or something( e.g : auto proxy configuration in chrome and IE's)?
 
Old 10-10-2011, 04:16 AM   #6
asiddique2u
LQ Newbie
 
Registered: Sep 2011
Location: bangalore
Distribution: ubuntu, centos
Posts: 28

Original Poster
Rep: Reputation: Disabled
Tried yum command now. Its showing "could not retrieve mirror list" error and "mirror list time out".
 
Old 10-10-2011, 04:58 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by asiddique2u View Post
I am using LAN to connect to the internet. I dont have the direct proxy server information rather i have a site which sends proxy server information. Do we have any feature like receiving proxy settings or something( e.g : auto proxy configuration in chrome and IE's)?
You might download the auto-configuration file from Firefox and retrieve the information from there. You should see a line like
Code:
return "PROXY proxy.server.en:8080";
that tells you the address of the proxy server and the port number. To gain your credentials (if required) you have to ask to the network administrator.

In alternative you can install the gcc package by manually download it, but you will encounter a lot of dependency problems so that you have to download more packages until you satisfy all of them. I think the most straightforward (and quick) method is to set up your proxy configuration, so that you can use yum from command line.
 
Old 10-10-2011, 08:11 AM   #8
themande
LQ Newbie
 
Registered: Jun 2011
Location: Pune, India
Distribution: CentOS6
Posts: 20

Rep: Reputation: 0
Please try following steps to install gcc from iso image:
1. First mount iso CentOS image in Linux.
2. cd /Your_DVD_Drive/Packages
3. ll *gcc* to check available gcc packages
4. rpm -ivh package_name to install gcc package
You may have to install dependency packages which will be available in the same directory.
I am not sure if CentOS has rpm files in Packages directory. But in my case I am using Red Hat Linux which has such packages in DVD_Drive/Packages directory.
Please let me know if these steps work for you.

Thanks,
Amit
 
Old 10-11-2011, 03:53 AM   #9
asiddique2u
LQ Newbie
 
Registered: Sep 2011
Location: bangalore
Distribution: ubuntu, centos
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by themande View Post
Please try following steps to install gcc from iso image:
1. First mount iso CentOS image in Linux.
2. cd /Your_DVD_Drive/Packages
3. ll *gcc* to check available gcc packages
4. rpm -ivh package_name to install gcc package
You may have to install dependency packages which will be available in the same directory.
I am not sure if CentOS has rpm files in Packages directory. But in my case I am using Red Hat Linux which has such packages in DVD_Drive/Packages directory.
Please let me know if these steps work for you.

Thanks,
Amit
Sorry for replying so late.
I tried what you said. I am using CentOS and the iso image of it doesnot contain any gcc packages.
 
Old 10-11-2011, 05:20 AM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
the cent dvd dose have gcc on it
that is why
"CentOS-6.0-x86_64-bin-DVD1.iso" is 3.9 gig's
and
CentOS-6.0-x86_64-bin-DVD2.iso is 1.1 Gig's

or is this the tinny live cd that is 689 Meg
if the live cd

there is basically nothing on it .

Quote:
I am unable to connect to internet through command line so can't use yum command although I am able to connect through firefox.
that normally means you are behind a router
set up the proxy as described a few posts above .


you might also want to READ the Cent wiki
http://wiki.centos.org/
proxy
http://wiki.centos.org/TipsAndTricks...7ebae9cc4fcb5a


however you are using "virtual box" on a Windows 7 install
you might want to ask the VB people how to configure it on Windows7
 
  


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
[NEWBIE] installing GCC - needs C compiler petesh Solaris / OpenSolaris 5 08-10-2010 05:38 AM
Installing Gcc Compiler on RHEL 4 anilhyd Linux - Software 1 11-01-2007 05:45 PM
installing gcc compiler Carunkumar Ubuntu 16 09-15-2006 05:05 AM
Installing another gcc compiler in mandrake 10.0 lbabey Linux - Software 8 03-31-2005 06:22 PM
Installing a GCC-compiler Jeff_G_1974 Fedora 1 02-28-2004 04:36 PM


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

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