Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Where to download C compiler
Whenever I'm trying to install a new program, I get the error message saying C compiler not found. Where can I download this C compiler. Is it the same thing as C++ compiler?? because I saw C++ compiler and it's not free.
So how can I get this C compiler that I need???
It's on your installation CD's and it's called gcc (well, actually g++ for the C++ compiler).
You will also need to install a bunch of other development packages in order to get a sane build environment so you can compile applications.
When I tried compiling mplayer, it said my gcc 2.9.6 wasn't supported. What version should I have? And how do you upgrade/downgrade the compiler? Is there anything else I should know that anyone can think of off the top of their heads? Thank you so much.
2.96 was a development release that RedHat was incredibly stupid to include in their stable release just because they wanted to be cutting edge. It has a ton of flaws and won't even compile the Linux kernel (which would be kinda handy in a Linux distribution, don'cha think?).
Anyway, downgrade to 2.95 or upgrade to 3.2 or 3.3. All these work just fine. Check you distribution's update directory, I believe there are 3.2 updates for RedHat (if that's what you use). Plus, it's possible that another - good - version is installed parallell with the 2.96 version. Do an ls -l /usr/bin | grep gcc to see what gcc-related binaries you have. In some distributions /usr/bin/gcc is a symlink to the real executable. If so, remove that symlink and create a new one pointing to the gcc version you wish to use.
First, I ran the command ls -l usr/bin | grep gcc and the result was: no such file or directory.
Okay, I downloaded gcc 3.2.2 to my usr/local/src file. I had to tar as root. That worked fine. Then I cd to the new directory and when I tried to configure I got this error:
Configuring for a i586-pc-linux-gnuoldld host.
Created "Makefile" in /usr/local/src/gcc-3.2.2 using "mt-frag"
./configure: line 7: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
How do I set the environment variable CC to a working compiler and what does this mean? Does it have anything to do with the gcc version I currently have: 2.9.6?
I believe that lib is from gcc-3.3.1, but I'm not sure. At any rate, something is likely haywire with your compiler, if you even have one installed. You never said which distro you have, but my advice would be for you to use your distro's app management system to uninstall/reinstall the compiler and any dependancies it needs.
DeHammer, thanks for all your help. I have mandrake 9.2 but I'm thinking of switching over to Vector, an offshoot of Slackware. Both seem to me to be ideal for being able to compile your own programs, which is something I'd really like to do. I tried looking for the install for the gcc on the mandrake package install menu, but it is not listed. Which is very weird. I'm really beginning to believe it's a Mandrake thing; either that, or I installed Mandrake wrong, without all the development files. I don't think I did that though; I think I did it right. Anyway, I want something I think is more pure and more in tune with compiling, so I'm either going to go slack or vector. I think this mandrake thing is a deadend; even when I tried to install mplayer from their package list, it didn't work; said I was missing some lib file. I just don't care to pursue that route. It's just too inefficient. I noticed your a slack user, if you have any advice, feel free to offer it. Thanks.
Well, I'm a biased Slackware user. I started out with Mandrake 3 or so years ago, then went to Redhat, then decided to try Slack. I was impressed right out of the gate with Slackware and probably won't ever use anything else as a main OS again. It does challenge you as a user to learn more about Linux than say Mandrake or Redhat though. Alot of the things that are almost automatic in Mandrake aren't in Slackware. You'll be forced to setup your own X configuration taylored to your hardware and such as that. But you'll learn a great deal doing it. So it really just depends on you and your needs. If you want something you can just install that will work without much involvement from you, then you should probably stick with a distro like Mandrake. On the other end of the spectrum, if your geniunely interested in learning the inner workings of Linux, then Slackware is a great way to do that. There are more hard core versions of Linux, like say Linux From Scratch, though.
I did the lastest version of LFS shortly after it was released, went well, didn't have any trouble that I recall. Also did the BLFS to the point of getting KDE up and running, but haven't really had time to mess with it much sense.