I cannot install anything because it appears that I have no compiler.
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!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I cannot install anything because it appears that I have no compiler.
I have been using linux for less than a week now. Lindows 4.0.579 is my OS, and it is running on a custom made machine.
I have been trying to install some programs, for example, mplayer. Before I can install mplayer I also need to download and install several other programs first. I quickly found that I cannot install anything because I always get an error message when running 'configure'. The error message is usually "no acceptable cc found in $PATH", "no acceptable C compiler in $PATH", or "You must set the environment variable CC to a working compiler."
I have tried to find where my compilers are so I can set them in $PATH, but I am unable to find anything, but I don't know what to look for either. I have downloaded gcc, but I get "You must set the environment variable CC to a working compiler." when I try to install it. I don't even know how to set the environment variable.
Does anybody have any ideas how I may get this fixed?
Did you download gcc as source? To check, does the README or INSTALL file tell you to do something like "./configure" and "make" and then "make install"? If so, you've got a chicken-and-egg situation - you can't compile your compiler because you haven't got a compiler! If you see what I mean.
You need to obtain a compiler in binary form, that is to say, already compiled. If I recall correctly, Lindows is based on Debian, so you could use apt-get to obtain what you need. I use Mandrake, so I can't help you with that. I also remember reading that Lindows had its own package installing utility in addition to apt-get, but I also remember that you need to pay a subscription to use it, so if you haven't paid then I guess it's apt-get for you. I expect you could type "man apt-get" to start yourself off.
If it is true what bublebboy says, he cannot install anything(from source). If there is no compiler on his box to begin with, how can you compile a compiler
But I find it a bit strange that there wouldn't be a compiler present.
To find out:
which cc
If something like this is returned:
/usr/bin/cc
check to see if the path (/usr/bin in above example) is present in your current PATH, this is how:
echo $PATH
If it is missing in your $PATH output, you must add it like this:
PATH=$PATH:/usr/bin (/usr/bin being what you found)
To make this permanent, add it to your ~/.profile (or ~/.bashrc)
If the 'which cc' didn't give you anything.......... No cc present.
I just took a look at the gcc site, seems that there are no binarie installs for linux.
Originally posted by druuna But I find it a bit strange that there wouldn't be a compiler present.
Strange, but far from impossible. When I first installed Linux, I bought the Mandrake 9.1 standard edition. This proved to contain no C compiler. I needed the power pack edition for the full distribution. Since Lindows is definitely not aimed at the hardcore Linux user, I can well believe they have left out the development tools.
Unfortunately, with Linux a C compiler is more than just a "development tool". Often it's an installing software tool too!
I just read an article about Lindows and you might be right about the 'missing' compiler. Definately not the flavor of linux I would like.
Anyway, do you (or anybody else) know why there isn't a binarie gcc for linux??
They are there for different platforms, and I used the ones for solaris, hp-ux and aix with succes. And I cannot come up with a reason why there shouldn't/couldn't be one for linux.
I don't know why the Free Software Foundation distribute it as source only, but the various Linux distros have to include gcc as a binary - if they didn't, nobody'd ever be able to use it. For example, in Red Hat and Mandrake gcc will be found as an RPM somewhere on the installation disks.
I blieve that the C compiler is required by gcc so it can compile higher level languages such as Java. I have never tried this before but heard the the way around this is as follows.
Compile gcc C compiler only. I'm not sure whether this will work but try the following:
Well, I don't know if I somehow just missed installing it, but I've run into the exact same problem and I'm on Slackware 9.1.
I have had a hell of a time getting anything to install, because everything as far as apps go out there are all tar.gz files and on my system ./configure returns that "no acceptable C compiler found in $PATH" message, and "make" just returns "command not found" for me.
I'm baffled at how I could have missed such an essential thing... I could have sworn I installed EVERYTHING when I set Slackware up on this machine...
I too had a problem with having no complier on Lindows (uname -r = 2.4.22). I found that Lindows is based on Debian (Woody). So apt-get and other apt-* commands exist and are native to the system. To get gcc on your system you need to do the following from console. You need to have a connection to the internet to run this.
cd /etc/apt
mv sources.list sources.list.old
echo "deb ftp://ftp.us.debian.org/debian stable main contrib non-free" > sources.list
apt-get update
apt-get install gcc
You will also want to install man so you can read the documentation for various commands on the system.
I'm not too sure how many people are still looking at this, but I did find that the earlier comment about setting
PATH=$PATH:/usr/bin/cc to work for compiling gcc. I had the same errors, and once I changed the setting the compilation worked just fine.
The advise on what to do when one get's the message “no acceptable C compiler in $PATH” was excellent and came in very handy for installing Clamav antivirus on my system. However, druuna also says to make the changes permanent, the ~/.profile (or ~/.bashrc) file needs to be edited. My question is, should we add the whole string (PATH=$PATH:/usr/bin) and where? Here's what my ~/.bashrc file looks like (I'm using Knoppix 3.6 in case that's of any relevance):
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.