# Problem Configuring Ruby Source in Linux

**URL:** <https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258>\
**Category:** Ruby\
**Created:** [March 1, 2007, 9:09am UTC](https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258 "2007-03-01T09:09:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edward\_WIJAYA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@Edward\_WIJAYA](https://www.ruby-forum.com/u/Edward_WIJAYA)\
**Post date:** [March 1, 2007, 9:09am UTC](https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258/1 "2007-03-01T09:09:35Z")

</div>

Hi all,

I’m new to Ruby, and I am trying to install Ruby-1.8.5  
in my linux box.

However upon configuring it, I encounter  
the following problem:

Checking build system type… i686-pc-linux-gnu  
checking host system type… i686-pc-linux-gnu  
checking target system type… i686-pc-linux-gnu  
checking for gcc… gcc  
checking for C compiler default output file name… configure: error: C  
compiler cannot create executables  
See `config.log’ for more details.

And GCC versin is: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

Can anybody suggest the right Ruby version  
I can install in my Linux?  
(I’ve also attached the config.log file).

I’m planning to use Ruby On Rail with Ruby.  
Hope to hear from you again.

–  
Edward

------------ Institute For Infocomm Research - Disclaimer -------------  
This email is confidential and may be privileged. If you are not the  
intended recipient, please delete it and notify us immediately. Please  
do not copy or use it for any purpose, or disclose its contents to any  
other person. Thank you.

---

<div class="post-metadata">

**Author:** ![Edward\_WIJAYA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@Edward\_WIJAYA](https://www.ruby-forum.com/u/Edward_WIJAYA)\
**Post date:** [March 1, 2007, 9:29am UTC](https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258/2 "2007-03-01T09:29:37Z")

</div>

On Mar 1, 2007, at 24:08, Edward WIJAYA wrote:

> checking for C compiler default output file name… configure:  
> Hope to hear from you again.  
> fix your CFLAG (or whatever) environment variable or mkdir ~/.ocaml/  
> include:

configure:2005: gcc I/home/ewijaya/.ocaml/include -I/home/  
ewijaya/.libstree/include -I/home/ewijaya/.gsl/include -I/home/  
ewijaya/.swish/include -I/home/ewijaya/.lapack/include -I/home/  
ewijaya/.berkeley\_db/include -I/home/ewijaya/.libgd/include -I/home/  
ewijaya/.graphviz/include -L/home/ewijaya/.ocaml/lib -L/home/  
ewijaya/.libstree/lib -L/home/ewijaya/.ghc/lib -L/home/ewijaya/.gsl/  
lib -L/home/ewijaya/.lapack/lib -L/home/ewijaya/.swish/lib -L/home/  
ewijaya/.berkeley\_db/lib -L/home/ewijaya/.libgd/lib -L/home/  
ewijaya/.graphviz/lib conftest.c \>&5  
gcc: I/home/ewijaya/.ocaml/include: No such file or directory

---

<div class="post-metadata">

**Author:** ![Edward\_WIJAYA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@Edward\_WIJAYA](https://www.ruby-forum.com/u/Edward_WIJAYA)\
**Post date:** [March 1, 2007, 10:35am UTC](https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258/3 "2007-03-01T10:35:48Z")

</div>

On Thu, Mar 01, 2007 at 05:08:05PM +0900, Edward WIJAYA wrote:

> Checking build system type… i686-pc-linux-gnu  
> checking host system type… i686-pc-linux-gnu  
> checking target system type… i686-pc-linux-gnu  
> checking for gcc… gcc  
> checking for C compiler default output file name… configure: error: C  
> compiler cannot create executables  
> See `config.log’ for more details.

which says, at the point where gcc tries to compile its first program:

…  
configure:2005: gcc I/home/ewijaya/.ocaml/include  
±I/home/ewijaya/.libstree/include -I/home/ewijaya/.gsl/include  
±I/home/ewijaya/.swish/include -I/home/ewijaya/.lapack/include  
±I/home/ewijaya/.berkeley\_db/include -I/home/ewijaya/.libgd/include  
±I/home/ewijaya/.graphviz/include -L/home/ewijaya/.ocaml/lib  
±L/home/ewijaya/.libstree/lib -L/home/ewijaya/.ghc/lib  
-L/home/ewijaya/.gsl/lib±L/home/ewijaya/.lapack/lib  
-L/home/ewijaya/.swish/lib  
±L/home/ewijaya/.berkeley\_db/lib -L/home/ewijaya/.libgd/lib  
±L/home/ewijaya/.graphviz/lib conftest.c \>&5  
gcc: I/home/ewijaya/.ocaml/include: No such file or directory  
configure:2008: $? = 1  
configure: failed program was:  
…

Which means you have some junk in your environment. It looks like you  
meant  
to set  
CFLAGS="-I/home/ewijaya/.ocaml/include …"  
but you actually have set is  
CFLAGS=“I/home/ewijaya/.ocaml/include …”

The safest thing is to get rid of any environment variables like this  
which  
could affect compilation (CFLAGS, LDFLAGS, LD\_RUN\_PATH etc). Remove them  
from .profile or .bash\_profile or wherever else it is that you set them,  
then logout and login again.

Or, being a bit more drastic, try:

env -i ./configure …

> And GCC versin is: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
> 
> Can anybody suggest the right Ruby version  
> I can install in my Linux?

Well you didn’t say what Linux distribution you have, nor what version,  
but  
I expect ruby-1.8.5 will be fine.

Of course, if you’re not comfortable compiling from source, then maybe  
you  
would be better off getting a pre-packaged ruby binary for whatever  
Linux  
distribution you have.

Brian.

---

<div class="post-metadata">

**Author:** ![Edward\_WIJAYA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@Edward\_WIJAYA](https://www.ruby-forum.com/u/Edward_WIJAYA)\
**Post date:** [March 1, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258/4 "2007-03-01T17:29:57Z")

</div>

On 3/1/07, Edward WIJAYA [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Checking build system type… i686-pc-linux-gnu  
> I can install in my Linux?  
> (I’ve also attached the config.log file).
> 
> I’m planning to use Ruby On Rail with Ruby.  
> Hope to hear from you again.
> 
> –  
> Edward

It looks like you’re running RedHat or maybe Fedora? It’s been a while  
since I’ve been in Fedora/RH, but can you install it via yum?

ie.

# yum install ruby

I am pretty sure I did that when I was trying to learn python a few  
years  
ago…

–  
Samantha

[http://www.babygeek.org/](http://www.babygeek.org/)

“Beware when the great God lets loose a thinker on this planet. Then all  
things are at risk.”  
–Ralph Waldo Emerson

---

<div class="post-metadata">

**Author:** ![Edward\_WIJAYA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@Edward\_WIJAYA](https://www.ruby-forum.com/u/Edward_WIJAYA)\
**Post date:** [March 1, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/problem-configuring-ruby-source-in-linux/87258/5 "2007-03-01T15:11:38Z")

</div>

Edward WIJAYA wrote:

> checking host system type… i686-pc-linux-gnu  
> checking target system type… i686-pc-linux-gnu  
> checking for gcc… gcc  
> checking for C compiler default output file name… configure: error:  
> C compiler cannot create executables  
> See `config.log’ for more details.  
> Please post the contents of this log file. What has happened is that the  
> C compiler crashed during “configure” and this log file will have that  
> error message. Thanks!

–  
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)  
[http://borasky-research.blogspot.com/](http://borasky-research.blogspot.com/)

If God had meant for carrots to be eaten cooked, He would have given  
rabbits fire.
