LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   still trying to install gcc (https://www.linuxquestions.org/questions/linux-newbie-8/still-trying-to-install-gcc-467643/)

matt kramer 07-25-2006 08:23 PM

still trying to install gcc
 
i've been having problems getting gcc installed on a fresh Mandrake installation. I'm going on night 3 trying to achieve this. I really need this so i can build other packages i'm needing. tonight i went here: http://rpm.pbone.net/index.php3/stat....i586.rpm.html
to download a gcc package. i installed it after download, no problems. and then i typed gcc and of course, "command not found". i then typed rpm -qi and got, "rpm is not installed". so i tried to install the package again and got, "already installed". i cannot figure this thing out. for the love of idea free please help.

homey 07-25-2006 08:56 PM

The link you posted is for gcc-doc . That's not likely what you want.
You don't say what distro version you have but, on my Mandriva 2006, it was easy enough to use the built in package manager....
urpmi gcc

# rpm -qa |grep gcc
gcc-4.0.1-5mdk
libgcc1-4.0.1-5mdk
gcc-cpp-4.0.1-5mdk

matt kramer 07-25-2006 09:11 PM

i have no idea what i'm doing. please be patient with with. i don't know what that stuff means or does. i typed urpmi gcc and got "The following packages contain gcc: gcc2.96-cpp libgcc1 gcc-cpp gcc-doc". but i don't understand the other stuff you showed. what do i do now that i know what packages contain gcc? i mean, where are they located and how do i install them?

oh and i'm using Mandrake 9

this is where i'm at:

Code:

[root@cpe-69-133-112-109 matt]# urpmi gcc
The following packages contain gcc: gcc2.96-cpp libgcc1 gcc-cpp gcc-doc
[root@cpe-69-133-112-109 matt]# rpm -qa |grep gcc
libgcc1-3.2.2-3mdk
gcc-cpp-3.2.2-3mdk
gcc-doc-3.3.1-2mdk
gcc2.96-cpp-2.96-0.82mdk
[root@cpe-69-133-112-109 matt]#


homey 07-25-2006 10:04 PM

A quick google turned up this site which has a lot of nice answers. http://speculation.org/garrick/urpmifaq.txt

When you ran the rpm -query all command, the listed packages are installed.
# rpm -qa |grep gcc
libgcc1-3.2.2-3mdk
gcc-cpp-3.2.2-3mdk
gcc-doc-3.3.1-2mdk
gcc2.96-cpp-2.96-0.82mdk

I don't see just plain gcc listed so, the first thing I would try is to check your urpmi media sources.
urpmq --list-media

http://easyurpmi.zarb.org/ has a nice tool for adding media sources.

make sure things are update with a command like ....
urpmi --auto-select

Then, I would try to install gcc again
urpmi gcc

matt kramer 07-25-2006 10:10 PM

Code:

[root@cpe-69-133-112-109 matt]# urpmq --list-media
Installation Desktop CD1 (x86) (cdrom1)
Installation Desktop CD2 (x86) (cdrom2)
Installation Desktop CD2 (x86) (cdrom3)
[root@cpe-69-133-112-109 matt]# urpmi --auto-select
Everything already installed
[root@cpe-69-133-112-109 matt]# urpmi gcc
The following packages contain gcc: gcc2.96-cpp libgcc1 gcc-cpp gcc-doc
[root@cpe-69-133-112-109 matt]#


homey 07-25-2006 10:28 PM

Quote:

# urpmq --list-media
Installation Desktop CD1 (x86) (cdrom1)
Installation Desktop CD2 (x86) (cdrom2)
Installation Desktop CD2 (x86) (cdrom3)
That shows that you have only cdroms for media sources.
I would go to http://easyurpmi.zarb.org/ and setup the sources so you can grab packages off the net.

matt kramer 07-26-2006 04:14 PM

not sure about everything i just did but it looks like media was added.

Code:

[root@cpe-69-133-112-109 matt]# urpmq --list-media
Installation Desktop CD1 (x86) (cdrom1)
Installation Desktop CD2 (x86) (cdrom2)
Installation Desktop CD2 (x86) (cdrom3)
main
contrib
updates

so i can download updates and my core was updated? what else?

matt kramer 07-26-2006 04:20 PM

[root@cpe-69-133-112-109 matt]# urpmi gcc
To satisfy dependencies, the following packages are going to be installed (30 MB):
binutils-2.13.90.0.18-3mdk.i586
gcc-3.2.2-3mdk.i586
glibc-2.3.1-10.1.91mdk.i586
glibc-devel-2.3.1-10.1.91mdk.i586
libbinutils2-2.13.90.0.18-3mdk.i586
Is this OK? (Y/n) y
Please insert the medium named "Installation Desktop CD1 (x86) (cdrom1)" on device [/dev/hdc]
Press Enter when ready...
http://mandrake.mirrors.pair.com/Man...-3mdk.i586.rpm
http://mandrake.mirrors.pair.com/Man...91mdk.i586.rpm
http://mandrake.mirrors.pair.com/Man...91mdk.i586.rpm
installing /var/cache/urpmi/rpms/glibc-devel-2.3.1-10.1.91mdk.i586.rpm /var/cache/urpmi/rpms/binutils-2.13.90.0.18-3mdk.i586.rpm /var/cache/urpmi/rpms/gcc-3.2.2-3mdk.i586.rpm /var/cache/urpmi/rpms/libbinutils2-2.13.90.0.18-3mdk.i586.rpm /var/cache/urpmi/rpms/glibc-2.3.1-10.1.91mdk.i586.rpm

Preparing... ##################################################
1:glibc ##################################################
2:glibc-devel ##################################################
3:libbinutils2 ##################################################
4:binutils ##################################################
5:gcc ##################################################
[root@cpe-69-133-112-109 matt]# gcc
gcc: no input files
[root@cpe-69-133-112-109 matt]#

matt kramer 07-26-2006 04:21 PM

thank you homey. i really appreciate that. i've been trying to get help with this for days. much love. my homie. good lookin out.

jschiwal 07-26-2006 04:27 PM

Why not search for gcc using the MCC's Software Installation program? It would be a lot easier. For the compiler packages and glibc packages, you don't want to mix and match versions or use packages built by someone else. Using another source for these could result in very large dependency lists down the line if you aren't careful, because everything is dependant on them. The compiler and libraries that you want to install are on your installation discs.

jschiwal 07-26-2006 04:29 PM

You posted your last message as I was composing mine. I'm glad that you got gcc installed.

oskar 07-26-2006 05:09 PM

What do you need gcc for?
I'm just asking, because one of the very first things I did when I started with linux was installing gcc, to compile a bunch of programs that were easily available anyway.

matt kramer 07-26-2006 05:19 PM

Quote:

Originally Posted by jschiwal
Why not search for gcc using the MCC's Software Installation program? It would be a lot easier. For the compiler packages and glibc packages, you don't want to mix and match versions or use packages built by someone else. Using another source for these could result in very large dependency lists down the line if you aren't careful, because everything is dependant on them. The compiler and libraries that you want to install are on your installation discs.

that's just the thing. i can't locate them on the installation disks on this machine. i could on other machines but not this one. i have no developer section when viewing the packages on this machine.

matt kramer 07-26-2006 05:24 PM

Quote:

Originally Posted by oskar
What do you need gcc for?
I'm just asking, because one of the very first things I did when I started with linux was installing gcc, to compile a bunch of programs that were easily available anyway.

alot of programs are not pre built. i come across many programs that only offer source. actually more than alot, most. plus i'm a programmer. haven't programmed anything in a few years but i should. wanting to learn to program on linux. wanting to learn everything about linux. i hate Windows. who knows. just something that should be on my machine to download programs sources if nothing else.

matt kramer 07-26-2006 05:26 PM

Quote:

Originally Posted by jschiwal
Why not search for gcc using the MCC's Software Installation program? It would be a lot easier. For the compiler packages and glibc packages, you don't want to mix and match versions or use packages built by someone else. Using another source for these could result in very large dependency lists down the line if you aren't careful, because everything is dependant on them. The compiler and libraries that you want to install are on your installation discs.

umm, cause that was the first thing i tried and i didn't have those packages. they aren't on my disk.


All times are GMT -5. The time now is 08:20 PM.