# Installing Ruby on Linux - Error

**URL:** <https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000>\
**Category:** Ruby\
**Created:** [February 18, 2007, 9:47pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000 "2007-02-18T21:47:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 18, 2007, 9:47pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/1 "2007-02-18T21:47:14Z")

</div>

I’m new to Linux, so it may well be that I’m missing some trivial.

However, I have Ubuntu installed on my Laptop, and I downloaded the  
Source for Ruby (ruby-1.8.5-p12), copied it across to my laptop (My  
laptop does NOT have internet access, so I can’t just apt-get,  
unfortunately), and tried the following:

./configure

It starts working, then right after “checking for C compiler default  
ouput file name…”, I get this:

“configure: error: C compiler cannot create executables”

Can anyone help me out with this one?

---

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 18, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/2 "2007-02-18T21:55:11Z")

</div>

Try:

echo “int main(){return 0;}” \> test.c  
gcc test.c

If it fails, gcc probably doesn’t have correct permissions or isn’t  
installed right.

Either way, you’ll probably get a more specific error message.

If it works, ./configure is lying.

Perhaps sudo first?

sudo ./configure

Aur S.

PLUG: All newbies, have a look at the adopt-a-newbie thread, it might  
benefit you

---

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 18, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/3 "2007-02-18T22:05:12Z")

</div>

Centipeed wrote:

> ouput file name…", I get this:
> 
> “configure: error: C compiler cannot create executables”
> 
> Can anyone help me out with this one?

I think Ubuntu doesn’t install any developer tools by default. You need  
the GCC compiler, autoconf and friends, and the GNU binutils. Probably  
there’s a package with everything you need, possibly called “developer  
tools” or something similar.

---

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 18, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/4 "2007-02-18T22:27:14Z")

</div>

On 2/18/07, Timothy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > It starts working, then right after “checking for C compiler default  
> > tools” or something similar.  
> > Right. It’s called build-essential.

---

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 18, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/5 "2007-02-18T22:32:14Z")

</div>

Timothy H. wrote:

> > It starts working, then right after "checking for C compiler default  
> > “developer tools” or something similar.

If the C compiler is installed, then

$ gcc --version

will return the version of the C compiler. I had something similar  
happen on one of my machines last week, and I _do_ have GCC installed.  
It turned out my CFLAGS environment variable was messed up, so if you do  
have GCC, check “CFLAGS” for sanity. What configure does is simply  
attempt to compile something – if it gets an error, you get that  
message. 🙂

–  
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.

---

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 18, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/6 "2007-02-18T23:10:21Z")

</div>

On Mon, 19 Feb 2007 06:04:42 +0900, Timothy H. wrote:

> > It starts working, then right after “checking for C compiler default  
> > tools” or something similar.  
> > You’ll need to install the package “build-essential” which will pull in  
> > a  
> > GCC, G++, linkers, make, and the basic header files which belong in  
> > /usr/  
> > include.

If you just have GCC installed, but not a linker, then your C compiler  
cannot create executables and you’ll get that error.

–Ken

---

<div class="post-metadata">

**Author:** ![Centipeed](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@Centipeed](https://www.ruby-forum.com/u/Centipeed)\
**Post date:** [February 19, 2007, 2:05pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-linux-error/86000/7 "2007-02-19T14:05:44Z")

</div>

Centipeed,

```
Out of the box Ubuntu lacks developers tools: compilers,

```

libraries, etc. Please post the output of ./configure if you want  
peopple to take a deeper look at what is missing in your setup. If you  
are newbye to linux I would strongly suggest to stick to version 1.8.4  
that you can install using apt (download the package and copy it to  
your laptop), unless you really need the features available in 1.8.5

–  
Aníbal Rojas

> **[RUBYCORNER.COM](https://www.rubycorner.com/)**
>
> RUBYCORNER.COM - Contact us for any business inquiries

> **[Home - Has Many Developers](https://hasmanydevelopers.com/)**
>
> We are the best choice for your building design and development
