Koozali.org: home of the SME Server

Getting and installing GCC.!?

Offline pauljclarke

  • **
  • 61
  • +0/-0
Getting and installing GCC.!?
« on: August 02, 2008, 11:03:09 AM »
Hi,

I'd know putting gcc on a machine facing the open world is not a good idea - point noted. However I have a machine that is safe and would like as part of my Higher Computing Degree, like to install gcc on it. Please can someone tell me how, as 'Yum install gcc' dose not work.!?

My other option is to install VMware on my XPbox... but do not know of a compatible linux dis that will a) run under it without issues and b) have gcc as part of it - if someone knows that would also be great!

Thanks

Paul

Offline Stefano

  • *
  • 10,879
  • +3/-0
Re: Getting and installing GCC.!?
« Reply #1 on: August 02, 2008, 11:10:47 AM »
pauljclarke

please explain
Quote
'Yum install gcc' dose not work

then.. what version of Sme are you running?

Ciao
Stefano

Offline pauljclarke

  • **
  • 61
  • +0/-0
Re: Getting and installing GCC.!?
« Reply #2 on: August 02, 2008, 02:36:25 PM »
SME 7.3 - all patches are up to date.

Yum reports "nothing to do"

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Getting and installing GCC.!?
« Reply #3 on: August 02, 2008, 03:34:01 PM »
pauljclarke

Quote
Please can someone tell me how, as 'Yum install gcc' dose not work.!?

That just means that either gcc is already installed and up to date, or more likely that the standard enabled repos do not have a gcc rpm in them.
You may need to find where gcc is and enable the repo for that location eg

yum install --enablerepo=dag gcc

(replace dag with a configured repo name, see FAQ)

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Getting and installing GCC.!?
« Reply #4 on: August 02, 2008, 07:14:07 PM »
That just means that either gcc is already installed and up to date
Check if gcc is already installed using this command:
Code: [Select]
rpm -q gcc*If GCC is installed it should output the package name(s) and versions.

If you do not have it installed you could install it form base using this command:
Code: [Select]
yum install gcc

Edit: corrected instructions
« Last Edit: August 03, 2008, 09:10:05 AM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Getting and installing GCC.!?
« Reply #5 on: August 02, 2008, 11:47:10 PM »
pauljclarke & cactus

On a standard sme7.3 gcc is not installed.

Quote
yum install gcc --enabelrepo=smedev

cactus, check your repos, gcc is not in smedev
http://distro.ibiblio.org/pub/linux/distributions/smeserver/releases/7/smedev/i386/RPMS/

You have a spelling mistake, the command should read
yum install gcc --enablerepo=xxxxxx
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: Getting and installing GCC.!?
« Reply #6 on: August 03, 2008, 02:06:27 AM »


[root@sme7vm ~]# yum --enablerepo=* list | grep gcc
libgcc.i386                              3.4.6-9                installed       
compat-gcc-32.i386                       3.2.3-47.3             base           
compat-gcc-32-c++.i386                   3.2.3-47.3             base           
compat-libgcc-296.i386                   2.96-132.7.2           base           
gcc.i386                                 3.4.6-9                base           
gcc-c++.i386                             3.4.6-9                base           
gcc-g77.i386                             3.4.6-9                base           
gcc-gnat.i386                            3.4.6-9                base           
gcc-java.i386                            3.4.6-9                base           
gcc-objc.i386                            3.4.6-9                base           
gcc4.i386                                4.1.2-14.EL4           base           
gcc4-c++.i386                            4.1.2-14.EL4           base           
gcc4-gfortran.i386                       4.1.2-14.EL4           base           
gcc4-java.i386                           4.1.2-14.EL4           base           
[root@sme7vm ~]#



[root@sme7vm ~]# yum install gcc
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package gcc.i386 0:3.4.6-9 set to be updated
--> Running transaction check
--> Processing Dependency: cpp = 3.4.6-9 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package cpp.i386 0:3.4.6-9 set to be updated
---> Package glibc-devel.i386 0:2.3.4-2.39 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-headers for package: glibc-devel
--> Processing Dependency: glibc-headers = 2.3.4-2.39 for package: glibc-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc-headers.i386 0:2.3.4-2.39 set to be updated
--> Running transaction check
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc-kernheaders.i386 0:2.4-9.1.100.EL set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 gcc                     i386       3.4.6-9          base              4.4 M
Installing for dependencies:
 cpp                     i386       3.4.6-9          base              1.6 M
 glibc-devel             i386       2.3.4-2.39       base              1.9 M
 glibc-headers           i386       2.3.4-2.39       base              587 k
 glibc-kernheaders       i386       2.4-9.1.100.EL   base              695 k

Transaction Summary
=============================================================================
Install      5 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         
Total download size: 9.2 M
Is this ok [y/N]:





« Last Edit: August 03, 2008, 02:15:28 AM by william_syd »
Regards,
William

IF I give advise.. It's only if it was me....

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Getting and installing GCC.!?
« Reply #7 on: August 03, 2008, 09:11:46 AM »
On a standard sme7.3 gcc is not installed.
I am aware of that.

cactus, check your repos, gcc is not in smedev
http://distro.ibiblio.org/pub/linux/distributions/smeserver/releases/7/smedev/i386/RPMS/

You have a spelling mistake, the command should read
yum install gcc --enablerepo=xxxxxx
Thanks, I must have been sleeping while posting :-), I corrected my instructions.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline pauljclarke

  • **
  • 61
  • +0/-0
Re: Getting and installing GCC.!?
« Reply #8 on: August 03, 2008, 04:45:17 PM »
Hi,

Issue was that the cent-os repo's were not enabled - I'd read somewhere on the forum that these should be turned off as "there is a lot of crap on there"... so having enabled cent-os I got gcc using nothing more than "yum install gcc".

Thanks for help.

P :o)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Getting and installing GCC.!?
« Reply #9 on: August 03, 2008, 05:08:31 PM »
Issue was that the cent-os repo's were not enabled -
Good you found the cause of your problem...

I'd read somewhere on the forum that these should be turned off as "there is a lot of crap on there"...
I would like to see a link to this information so we can make a reply that that is pure nonsense as these repositories (base and updates) are the main repositories providing the basic packages needed for CentOS, which is Linux OS geared towards stability... which makes it hard to believe for me that there is a lot, or even any, of crap in there.

I am running CentOS (also configured using those repositories) for years without any problems what so ever.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)