LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 10: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, 10:11 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
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 10:14 AM.
 
Old 04-24-2012, 10: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, 10:47 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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, 11:33 AM   #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, 11:38 AM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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, 11:39 AM   #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, 11:45 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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 11:46 AM.
 
Old 04-24-2012, 11:47 AM   #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 12:15 PM.
 
Old 04-25-2012, 05:27 PM   #10
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
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, 07:31 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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



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

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

All times are GMT -5. The time now is 05:45 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
Open Source Consulting | Domain Registration