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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
09-16-2007, 02:17 AM
|
#1
|
LQ Newbie
Registered: Sep 2007
Distribution: Linspire
Posts: 8
Rep:
|
"No C compiler found in $PATH" - why not?
I know this has probably been asked multiple times before, but:
I installed gcc (GNU c compiler) v 2.95 from CNR so that I could compile sodipodi. However, after it was installed to /usr/bin/, I found that ./configure still kept telling me "$no acceptable c complier found in $PATH". So, I created a symlink to gcc, still got an error, even copied the binary from /usr/bin to sodipodi's directory, hoping that that would put a c compiler in $PATH, and ran ./configure again. Still no acceptable c compiler found in $PATH.
How do I set gcc as my default c compiler so that ./configure will stop giving me this error? I'm using Linspire, by the way, if you hadn't already figured that out when I mentioned "CNR".
|
|
|
09-16-2007, 02:28 AM
|
#2
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
Go to a terminal and type "echo $PATH" without the quotes and see if /usr/bin is in it. If all else fails, you could try a symlink in /bin, but /usr/bin should be in everyone's path. Hrmm.
|
|
|
09-16-2007, 02:40 AM
|
#3
|
LQ Newbie
Registered: Sep 2007
Distribution: Linspire
Posts: 8
Original Poster
Rep:
|
This is the output...
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/bin:/usr/share/qt3/bin
I don't quite understand it. /usr/bin/ is the second path in $PATH. Do the paths need to be in a different order? If so, how do I set $PATH?
Edit:
I created a symlink to gcc in /bin, but it didn't satisfy ./configure.
Last edited by tengun; 09-16-2007 at 02:43 AM.
|
|
|
09-16-2007, 03:10 AM
|
#4
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
The problem can be related to the fact that the available gcc compiler is not suitable to the compilation for some reason. Maybe a too old version? Anyway, to force using a compiler you can define the environment variable
before launching ./configure. Second, would be useful to inspect the gcc executable by
you should obtain something like (if you are on a 32-bit machine)
Code:
/usr/bin/gcc-4.1: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped
if not, probably something went wrong when installing the compiler.
|
|
|
09-16-2007, 02:00 PM
|
#5
|
LQ Newbie
Registered: Sep 2007
Distribution: Linspire
Posts: 8
Original Poster
Rep:
|
Well, I tried force CC=gcc, and it did recognize gcc. However, it then told me that my "C compiler cannot create executables".
When I ran file, the output was:
Quote:
gcc-2.95: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped
|
So, since I knew I might be able to use apt-get to find a more recent binary, I issued
Code:
apt-get install gcc-4.1
...however, apt-get couldn't find the package.
I am using gcc version 2.95 (I have no idea why CNR would have an outdated version, and the most recent one they have is version 3.4) - where can I find a more recent binary?
|
|
|
09-16-2007, 05:12 PM
|
#6
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by tengun
So, since I knew I might be able to use apt-get to find a more recent binary, I issued
Code:
apt-get install gcc-4.1
...however, apt-get couldn't find the package.
|
Hmmm... I'm not used to apt-get, nor I know about Linspire distribution, but you can try
Code:
apt-get install gcc
without version number, or
Code:
apt-get install build-essential
then report exactly any eventual error message. I'm sure some other member more experienced than me about apt-get can help to go through this issue. Cheers!
|
|
|
09-16-2007, 08:40 PM
|
#7
|
LQ Newbie
Registered: Sep 2007
Distribution: Linspire
Posts: 8
Original Poster
Rep:
|
Code:
dell:~# apt-get install gcc
Reading Package Lists... Done
Building Dependency Tree... Done
Package gcc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package gcc has no installation candidate
Code:
dell:~# apt-get install build-essential
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package build-essential
dell:~#
Hmm... the package is "missing, has been obsoleted, or
is only available from another source"?
|
|
|
09-22-2007, 04:20 PM
|
#8
|
LQ Newbie
Registered: Sep 2007
Distribution: Linspire
Posts: 8
Original Poster
Rep:
|
Update: I uninstalled my old, outdated version of GCC and replaced it with a less obsolete version (3.4). I set it as the default with "export CC=gcc", and it gave me the same error until I copied the "gcc-3.4" file to just "gcc". Then configure ran fine, generating a couple screens worth of output, and all seemed to be fine until the end. Configure just required me to have gcc, g++, gpp and pkg-config, and they had to be those exact names or configure wouldn't find them (mine had names like gcc-3.4 and g++-3.4). My cpp wasn't sane because I didn't have the GNU c++ compiler, g++ (which presumably told gpp how to function).
To make a long story short, I got it solved, and if anyone using the Linspire distro has my problem, they should visit my CNR aisle.
Last edited by tengun; 09-22-2007 at 07:36 PM.
|
|
|
All times are GMT -5. The time now is 09:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|