LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-30-2003, 11:26 AM   #1
bublebboy
LQ Newbie
 
Registered: Dec 2003
Posts: 13

Rep: Reputation: 0
Exclamation 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?
 
Old 12-30-2003, 11:37 AM   #2
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
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.
 
Old 12-30-2003, 11:40 AM   #3
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
BTW - once you've got your compiler installed, you shouldn't need to worry about any environment variables - they should already be set up.
 
Old 12-30-2003, 11:45 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403
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.
 
Old 12-30-2003, 11:49 AM   #5
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
Quote:
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!
 
Old 12-30-2003, 11:56 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403
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.
 
Old 12-30-2003, 12:01 PM   #7
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
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.
 
Old 12-30-2003, 12:15 PM   #8
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
The following page deails requirements for compiling GCC from source:
http://gcc.gnu.org/install/prerequisites.html

These do include a C compiler believe it or not.

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:

#env CC=gcc ./configure --prefix=/usr/local/gcc --enable-shared --with-gnu-as --with-gnu-ld --enable-languages=c

# make
# make install

If this works you can then go ahead and compile gcc again setting the CC=/usr/local/gcc
 
Old 12-30-2003, 12:19 PM   #9
vasudevadas
Member
 
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
Quote:
Originally posted by codedv
The following page deails requirements for compiling GCC from source:
http://gcc.gnu.org/install/prerequisites.html

These do include a C compiler believe it or not.
I'd be very impressed indeed if a working C compiler was not a requirement for compiling GCC!
 
Old 12-30-2003, 12:32 PM   #10
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
I found this thread in the Lindows support forum which may help:
https://forum.lindows.com/forum/show...=&view=&sb=&o=
 
Old 12-30-2003, 12:36 PM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403
The (gcc) URL mentioned states clearly that an ISO C90 compiler (or for 'older' gcc's the (K&R) C compiler) is a prerequisite for building gcc.

The (lindows) URL is the answer to this problem.

Last edited by druuna; 12-30-2003 at 12:39 PM.
 
Old 01-30-2004, 07:21 PM   #12
Melkor
Member
 
Registered: Aug 2003
Location: MN
Distribution: Linux Mint
Posts: 179

Rep: Reputation: 34
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...
 
Old 02-17-2004, 10:42 AM   #13
santosg
LQ Newbie
 
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Lindows no compiler

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.

apt-get install man


More information on apt-get can be found here
http://www.debian.org/doc/manuals/ap.../index.en.html

You might also want to review dpkg as well.pks
http://www.dpkg.org/documentation/

I hope this helps you, I need the karma to get the sound to work on my Thinkpad 600E. It is a known problem with an unknown solution.
 
Old 10-22-2004, 07:21 PM   #14
rphook
LQ Newbie
 
Registered: Sep 2004
Location: I don't have a clue
Distribution: something trendy
Posts: 19

Rep: Reputation: 0
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.
 
Old 12-07-2004, 01:54 AM   #15
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Rep: Reputation: 15
Making changes permanent

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):

# /etc/bash.bashrc
[ -f /etc/profile ] && . /etc/profile

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! my linux install appears corrupted... gauntalus Linux - General 5 01-22-2005 03:00 PM
how to install c compiler albanas Linux - Newbie 5 12-25-2004 01:31 AM
how to install a C++ Compiler? retry Linux - General 1 12-10-2004 06:09 AM
USB conflict appears to be crashing SuSE 8.2 install xxvm1 Linux - Newbie 1 07-06-2004 08:53 PM
How do i install a compiler......? BajaNick Linux - Software 4 12-19-2003 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration