LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 11-21-2011, 02:12 PM   #1
KingSalibah
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
gcc install question for CentOS 5.6


I know very little about linux.
I am running a web server on a Centos 5.6 server.
I was trying to install git, but I can't because I don't have gcc installed.
So, I tried to install gcc, but then I get a massive amount of prerequisities like glibs then kernal, etc. and I am like whoa! Not so fast!

All I want to do is install git!

The latest versions of gcc are beyond 5.6. Is there a simple installer for gcc that includes everything that doesn't require a full OS update?

Or is there another way to install git?

I have a folder called /usr/libexec/gcc/x86_64-redhat-linux/ which has a 4.1.1 and a 4.1.2 folder with cc1 inside, but when I typed "rpm -ql gcc" it said package gcc is not installed.

I have been at the brink of giving up for about 10 hours. But I keep trying this and that. Are there some simple solutions here?
 
Old 11-21-2011, 02:26 PM   #2
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,862

Rep: Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030
If you are still on 5.6 then you're looking at about 100mb of updates to get to 5.7. This is totally normal and in fact is a Good Thing because you'll get the latest bug fixes and security patches.

I recommend updating your system regularly. If this is an important production server then it's prudent to have a test system too.

Here are some resources to help you get started with CentOS:

https://www.centos.org/modules/newbb...m.php?forum=47
http://www.centos.org/modules/newbb/...14273&forum=47
 
Old 11-21-2011, 02:40 PM   #3
KingSalibah
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks. I am a little concerned in that the server is not connected to the Internet. It is a intranet server. I suppose I need to check into this. I don't think it is quite simple for a newbie like me to do a new OS upgrade.
 
Old 11-21-2011, 02:45 PM   #4
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,862

Rep: Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030
Wow, you are a fast reader, you breezed right through all those "How To's" in only 14 minutes!
Let me know if you have any more questions, good luck.
 
0 members found this post helpful.
Old 11-21-2011, 02:54 PM   #5
KingSalibah
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Is it possible that CentOS doesn't have gcc installed? Is there no other way to install git without gcc installed?

Thanks for your suggestion that I should upgrade from 5.6 but I don't see that the links you provided assist me with that.

While I realize I know very little about CentOS, I am trying to solve my current problem before I go off onto another lengthy study, among the dozens of things I am already deeply delved into study-wise.

Last edited by KingSalibah; 11-21-2011 at 02:59 PM.
 
Old 11-21-2011, 03:01 PM   #6
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 865

Rep: Reputation: 110Reputation: 110
How are you trying to install git? Do you know what gcc is? If you are trying to install from a tarball with source code then thats why you need gcc to compile it. GCC, the GNU Compiler Collection is a C language compiler. Have you used YUM to try and install needed tools?

Test if you have GCC install type in terminal aka command prompt
Code:
gcc -v
It should give you the version of gcc if installed.
 
Old 11-21-2011, 03:08 PM   #7
KingSalibah
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes, I was trying to install git with a tar.gz file. I suppose if there is an rpm version, that would be simpler.

gcc -v says "bash: gcc: command not found."
 
Old 11-21-2011, 03:20 PM   #8
KingSalibah
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
I couldn't find an rpm on git's site, but jmc1987 gave me the idea of looking further. I found the packages at http://pkgs.repoforge.org/git/. Yay!

I am not sure what to do about 5.6 upgrade. I would need to find a good tutorial about that. As to gcc, I thought it would be installed already and then thought it would be easy to install, but I wasn't so lucky.
 
Old 11-21-2011, 03:43 PM   #9
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 865

Rep: Reputation: 110Reputation: 110
to update your system you would simply run
# in front means root
$ means user account and execute it

Now to update to 5.7
Code:
#yum update
Now I am assuming you have a x86_64 based on the libs you linked on first post.

Now setting up rpm forge repos
Code:
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
$ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
$ rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
# rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
Installing git
Code:
# yum install git
Now in my opinion you should disable this repo so you don't get any packages that may break your system.

Source:
http://wiki.centos.org/AdditionalRes...11404998926a1b

Last edited by jmc1987; 11-21-2011 at 03:46 PM.
 
Old 11-21-2011, 03:51 PM   #10
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,862

Rep: Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030Reputation: 1030
Quote:
Originally Posted by KingSalibah View Post
Thanks for your suggestion that I should upgrade from 5.6 but I don't see that the links you provided assist me with that.

While I realize I know very little about CentOS, I am trying to solve my current problem before I go off onto another lengthy study, among the dozens of things I am already deeply delved into study-wise.
Your approach is correct, let's forget about upgrading to 5.7 for now and address your immediate problem of installing git.

The package manager (tool for installing software) in CentOS is called 'yum' so start here:

http://www.centos.org/docs/5/html/yum/
http://www.centos.org/docs/5/html/yu...ompackage.html

Because this machine is not connected to the internet, you may wish to set up a local repository. This could be a local mirror somewhere on the network or as simple as a copy of the CentOS DVD.

(edit) Weird if git is not in the centos repos but if so jmc1987 has some advice above.

Last edited by snowpine; 11-21-2011 at 04:01 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS install question unix1adm Linux - General 12 11-13-2009 06:49 AM
CentOS - gcc path question rheng Linux - Newbie 3 07-29-2008 01:13 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare Suse/Novell 3 11-29-2004 02:13 PM
gcc install question bdirks Linux - Software 2 02-11-2004 01:53 PM
question about Gcc and install chrisr99 Linux - Software 0 06-20-2002 08:04 AM


All times are GMT -5. The time now is 06:31 AM.

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