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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-24-2012, 11:09 AM
|
#1
|
Member
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45
Rep: 
|
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.
|
|
|
04-24-2012, 11:11 AM
|
#2
|
Senior Member
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
|
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.
|
|
|
04-24-2012, 11:35 AM
|
#3
|
Member
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45
Original Poster
Rep: 
|
Quote:
Originally Posted by jbennett
I have tried various methods of using our proxy here at work, but nothing seems to work.
|
See above...
|
|
|
04-24-2012, 11:47 AM
|
#4
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
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.
|
|
|
04-24-2012, 12:33 PM
|
#5
|
Member
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45
Original Poster
Rep: 
|
Quote:
Originally Posted by suicidaleggroll
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?
|
|
|
04-24-2012, 12:38 PM
|
#6
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by jbennett
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/
|
|
|
04-24-2012, 12:39 PM
|
#7
|
Member
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45
Original Poster
Rep: 
|
Quote:
Originally Posted by suicidaleggroll
|
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?
|
|
|
04-24-2012, 12:45 PM
|
#8
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by jbennett
|
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.
|
|
|
04-24-2012, 12:47 PM
|
#9
|
Member
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45
Original Poster
Rep: 
|
Quote:
Originally Posted by suicidaleggroll
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
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.
|
|
|
04-25-2012, 06:27 PM
|
#10
|
Senior Member
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
|
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...
|
|
|
04-25-2012, 08:31 PM
|
#11
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,674
|
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
|
|
|
All times are GMT -5. The time now is 10:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|