LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing gcc-where to get binary copy (https://www.linuxquestions.org/questions/linux-newbie-8/installing-gcc-where-to-get-binary-copy-103239/)

mjkramer 10-12-2003 08:20 PM

Installing gcc/cant install packages
 
I dont have a compiler to compile the sources for gcc. Know where I can get a binary copy?

contrasutra 10-12-2003 08:33 PM

Whatever distribution you have should come with a GCC package. Install it.

RPM:

rpm -Uvh /path/to/package.rpm

mjkramer 10-12-2003 09:09 PM

This is what I get when I do that:

error: cannot open Packages Index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm


I have 2 gcc related packages, didnt know which one to use so I tried the above entry on both and got the same errors. The two packages were:

gcc-cpp-------.--------.--------.-------.rpm
gcc2.96-cpp-2.-------.--------.-------.rpm

mjkramer 10-12-2003 09:48 PM

Ok, it suddenly occured to me that I might be trying to do things that I cannot do under the user I was logged in with. So I tried installing those packages under the root user and it replied by saying that the packages were already installed.

However, when I use the rpm -q gcc command it can't find it! Nor can it be found when trying to compile source files! Whats the deal man? How do I find out where my compiler is located?


megaspaz 10-12-2003 09:53 PM

whereis gcc

or if you want more output

locate gcc

mjkramer 10-12-2003 10:10 PM

ohmygosh!
 
i think, i am supposed to type whereis 'path' gcc, right?

i typed, whereis '/' gcc. What do you think about that?

i get this big list of locations. How do I know which location is specific to the exact location of the compiler?

I assumed I should look in the location listed as:
/usr/src/RPM

when I went there, there was only one directory which was:
/RPMS
and this directory had many directories of gcc files ive seen along this challeging escapade of trying to download, locate, and run my compiler, such as:

athlon
i386
i486
i586
k6
noarch

all of these files are empty! What does that mean? I dont even know if Im on the right track. What should my next step be?



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