LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gcc install question for CentOS 5.6 (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-install-question-for-centos-5-6-a-914750/)

KingSalibah 11-21-2011 02:12 PM

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?

snowday 11-21-2011 02:26 PM

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

KingSalibah 11-21-2011 02:40 PM

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.

snowday 11-21-2011 02:45 PM

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. :)

KingSalibah 11-21-2011 02:54 PM

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.

jmc1987 11-21-2011 03:01 PM

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.

KingSalibah 11-21-2011 03:08 PM

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."

KingSalibah 11-21-2011 03:20 PM

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.

jmc1987 11-21-2011 03:43 PM

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

snowday 11-21-2011 03:51 PM

Quote:

Originally Posted by KingSalibah (Post 4529981)
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.


All times are GMT -5. The time now is 01:14 PM.