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 04-24-2012, 11:09 AM   #1
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Rep: Reputation: Disabled
GCC without the use of YUM


I am having one heck of a time trying to install GCC without the use of YUM. I have tried various methods of using our proxy here at work, but nothing seems to work.

I need to get GCC on our system, but cannot use YUM.

This is CentOS 6.2 on a virtual machine.

Any help would be appreciated.
 
Old 04-24-2012, 11:11 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Why can you not use yum? You could theoretically compile from source, but it's almost always a better idea to use a package manager if you have one available...

EDIT: or you could find and download an rpm, and use the 'rpm' command to install it. But my question regarding YUM stands!

Last edited by Snark1994; 04-24-2012 at 11:14 AM.
 
Old 04-24-2012, 11:35 AM   #3
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jbennett View Post
I have tried various methods of using our proxy here at work, but nothing seems to work.
See above...
 
Old 04-24-2012, 11:47 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
You should be able to set up the install DVD as a repo for yum, so it can grab the files straight off of the DVD without having to go through the net.
 
Old 04-24-2012, 12:33 PM   #5
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
You should be able to set up the install DVD as a repo for yum, so it can grab the files straight off of the DVD without having to go through the net.
I am not certain about how to go about doing this. Any links to detailed instructions?
 
Old 04-24-2012, 12:38 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
Quote:
Originally Posted by jbennett View Post
I am not certain about how to go about doing this. Any links to detailed instructions?
Hopefully this will help:
http://www.ehowstuff.com/how-to-setu...on-centos-6-2/
 
Old 04-24-2012, 12:39 PM   #7
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Unfortunately, even with my proxy enabled, I cannot see that site. I have found this though: http://www.megalinux.net/using-fedor...um-repository/

Does this look correct?
 
Old 04-24-2012, 12:45 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
Quote:
Originally Posted by jbennett View Post
Unfortunately, even with my proxy enabled, I cannot see that site. I have found this though: http://www.megalinux.net/using-fedor...um-repository/

Does this look correct?
It's a little different, but not in any way that really matters. Your link describes the process for mounting the iso image and using that, the one I posted describes mounting the DVD itself. I've copied the instructions below:

Quote:
In this post, i will share on how to update and install the RPM packages from CD-ROM/DVD-ROM image on CentOS 6.2. This will very useful when you are running on slow internet connection. Instead of go through the internet connection, it is possible to use Local CD/DVD-ROM as your yum repository. There are two methods to install and configure local CentOS 6.2 yum repository. Both methods have been tested and working on CentOS 6.2 linux server. You can select any method that you most preferred. This may be also applicable on other version of CentOS server.

Method 1:
1. Insert DVD/ISO into DVD-Drive.
2. Mount the ISO from the DVD-ROM into /mnt directory :

Code:
[root@centos62 ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
3. Create centos62.repo text file in /etc/yum.repos.d/ with the following content. Please create something as follow:

Code:
[root@centos62 ~]# vi /etc/yum.repos.d/centos62.repo
Code:
[CentOS6.2-Repository]
name=DVD-CentOS6.2 repository
baseurl=file:///mnt
enabled=1
gpgcheck=0
4. Finish. You can start install, remove and update using yum command :
Example :

Code:
[root@centos62 ~]# yum install httpd -y
He then goes onto describe a second, and much more complicated method.

Last edited by suicidaleggroll; 04-24-2012 at 12:46 PM.
 
Old 04-24-2012, 12:47 PM   #9
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
It's a little different, but not in any way that really matters. Your link describes the process for mounting the iso image and using that, the one I posted describes mounting the DVD itself. I've copied the instructions below:
I only have an ISO for use. It's how I installed the OS on the VM.

I have mounted the OS seeing as how the system has a virtual ROM drive with the ISO mounted as suggested in your post.

I take it that I should now be able to type

Code:
yum install gcc -y
However, when I do this, it is trying to retrieve the mirrorlist, which won't work.

Code:
[root@localhost local]#yum install gcc -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
14: PYCURL ERROR 22 - "The requested URL returned error: 407"
Error: Cannot find a valid baseurl for repo: base
When I type the following:

Code:
yum -y localinstall gcc.rpm
I get
Code:
Cannot open: gcc.rpm. Skipping. Nothing to do
Please note: I am actually trying to install Apache (httpd). In the process, apparently I don't have a compiler on this system.

Last edited by jbennett; 04-24-2012 at 01:15 PM.
 
Old 04-25-2012, 06:27 PM   #10
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Did you carry out step (3) that was posted by suicidaleggroll? (editing /etc/yum.repos.d/centos62.repo)

Also, if you're trying to install Apache, then you probably want to use yum to install that, rather than install gcc and then compiling apache yourself...
 
Old 04-25-2012, 08:31 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,218

Rep: Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517Reputation: 2517
and on cent install the WHOLE development group and not just gcc
you need WAY more installed than gcc only
Code:
su -
yum groupinstall " Development Tools" "Development Libraries"
and you might also need the Gnome development files
see the list of groups
Code:
yum grouplist
 
  


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
yum install gcc gcc-c++ nishamcp Linux - Newbie 3 12-26-2011 03:07 AM
gcc, yum installation?! Junior Learner Linux - Software 11 07-26-2009 05:42 AM
yum install gcc doesn't set the lastest gcc ver 4.3.x kim,jw Linux - Newbie 3 12-23-2008 12:51 AM
yum install gcc... nilrisi Linux - Newbie 4 07-27-2008 09:21 PM
yum update gcc to 4.2.x mwainwright Fedora 1 06-08-2007 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:49 PM.

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