LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help locating a c compiler (https://www.linuxquestions.org/questions/linux-newbie-8/help-locating-a-c-compiler-466976/)

matt kramer 07-23-2006 11:56 PM

help locating a c compiler
 
how do i know if i have one and how do i put it in my path once i've located it?

raskin 07-24-2006 12:41 AM

If simply running gcc fails, I guess it is not installed. Get the rpm and install it.

matt kramer 07-24-2006 01:25 AM

well i looked at the rpm packages on my install disk and found these:

gcc2.96-cpp-2.96-0.82mdk.i586.rpm
gcc-cpp-3.2.2-3mdk.i586.rpm

i tried to install them and was told by the system they were already installed. so how do i make them work?

contiguous 07-24-2006 01:28 AM

you can simply type:

Quote:

rpm -qv gcc
for querying version.

or

Quote:

rpm -qi gcc
for querying info.

You can go to this web site for more help:

http://httpd.apache.org/docs/2.2/install.html

matt kramer 07-24-2006 01:47 AM

it said gcc is not installed.

im confused. why if i try to install the package it sais it's already installed but then the above cammand tells me it's not installed?

raskin 07-24-2006 02:05 AM

Maybe this packages are only part of gcc - cpp, which is not enough for compiling anything.. Maybe you'll have to download a package called gcc-<version>.rpm, without cpp ore something in name.

matt kramer 07-24-2006 02:30 AM

i'm having the same problem i'm having with installing packages needed to play dvd's:

every package i try to install requires a list of more packages wich require more packages which require more packages and on and on and on infinity. it's impossible.

i just tried to install: gcc-3.4.3-7mdk.i586.rpm

and i got: error: failed dependencies:
binutils >= 2.15.92.0.2-1mdk is needed by gcc-3.4.3-7mdk
gcc-cpp = 3.4.3-7mdk is needed by gcc-3.4.3-7mdk
libgcc >= 3.3.2-5mdk is needed by gcc-3.4.3-7mdk
glibc-devel >= 2.2.5-14mdk is needed by gcc-3.4.3-7mdk

so i tried to install the first one on the list: binutils, and of course..............

error: failed dependencies:
lib64binutils2 = 2.15.92.0.2-6mdk is needed by binutils-2.15.92.0.2-6mdk
libbfd-2.15.92.0.2.so()(64bit) is needed by binutils-2.15.92.0.2-6mdk
libc.so.6()(64bit) is needed by binutils-2.15.92.0.2-6mdk
libc.so.6(GLIBC_2.2.5)(64bit) is needed by binutils-2.15.92.0.2-6mdk
libc.so.6(GLIBC_2.3)(64bit) is needed by binutils-2.15.92.0.2-6mdk
libdl.so.2()(64bit) is needed by binutils-2.15.92.0.2-6mdk
libdl.so.2(GLIBC_2.2.5)(64bit) is needed by binutils-2.15.92.0.2-6mdk
libopcodes-2.15.92.0.2.so()(64bit) is needed by binutils-2.15.92.0.2-6mdk

but i found out something cool: you can install packages without typing their full path by using *. like rpm -i binutils*. that's freakin' sweet. that's gonna make my linux experience a little smoother.

question: if i type rpm -i binutils* and i have more than one package starting with binutls will it install all of them?

ok, back to the compiler problem

contiguous 07-24-2006 02:53 AM

Try changing your directory to where the Linux packages (on your CD, or elsewhere), and type the following:

rpm -ivh gcc-'version'.rpm --aid

The --aid option will automatically install any packages that are needed by 'gcc', from the current directory (the packages directory).

raskin 07-24-2006 03:05 AM

Do you have yum?

matt kramer 07-24-2006 03:09 AM

it said that --aid is an uknown option. someone told me to use urpmi for that similar function which i tried that too but it's still coming up with missing dependencies.

matt kramer 07-24-2006 03:17 AM

Quote:

Originally Posted by raskin
Do you have yum?

i don't know. i typed yum, whatever that is, and it didn't recognize it. as of yet, i only know how to search for rpm's that are installed. i tried rpm -qi yum*, untuitively trying to utilize all the resources i have aquired which are slim, but that didn't work. guess one can't use * in this way.

.......but i looked it up on the net. let's see where that takes me.................

that's neat. how do i use it, lol.

i got it installed. looks like i pass an rpm to it?
i think it's expecting one. it gave me this:

./yum/__init__.py:1097: Warning: 'yield' will become a reserved keyword in the future
./yum/__init__.py:1121: Warning: 'yield' will become a reserved keyword in the future
Traceback (most recent call last):
File "./yummain.py", line 22, in ?
from yum import Errors
File "./yum/__init__.py", line 21, in ?
import rpm
ImportError: No module named rpm

contiguous 07-24-2006 03:55 AM

try 'removing' (if this can be done) gcc:

rpm gcc --erase --nodeps

--nodeps : will remove the gcc package even if other packages are dependent on it.

then reinstall it again from your linux cds.

matt kramer 07-24-2006 04:48 AM

it's like i thought, gcc doesn't exist, "package not installed"


All times are GMT -5. The time now is 10:00 PM.