Forum: Ruby Installing Ruby on Linux - Error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
39e7909330501a17cc49ec50abe5f7ad?d=identicon&s=25 Centipeed (Guest)
on 2007-02-18 21:47
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?
7b4707f974af261f71943e1f2046c9ee?d=identicon&s=25 SonOfLilit (Guest)
on 2007-02-18 21:55
(Received via mailing list)
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 Saraf

PLUG: All newbies, have a look at the adopt-a-newbie thread, it might
benefit you
3afd3e5e05dc9310c89aa5762cc8dd1d?d=identicon&s=25 Timothy Hunter (Guest)
on 2007-02-18 22:05
(Received via mailing list)
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.
97550977337c9f0a0e1a9553e55bfaa0?d=identicon&s=25 Jan Svitok (Guest)
on 2007-02-18 22:27
(Received via mailing list)
On 2/18/07, Timothy Hunter <TimHunter@nc.rr.com> wrote:
> > It starts working, then right after "checking for C compiler default
> tools" or something similar.
Right. It's called build-essential.
3bb23e7770680ea44a2d79e6d10daaed?d=identicon&s=25 M. Edward (Ed) Borasky (Guest)
on 2007-02-18 22:32
(Received via mailing list)
Timothy Hunter 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/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
851acbab08553d1f7aa3eecad17f6aa9?d=identicon&s=25 Ken Bloom (Guest)
on 2007-02-18 23:10
(Received via mailing list)
On Mon, 19 Feb 2007 06:04:42 +0900, Timothy Hunter 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
C381828d1907912eab30cbe38d5ea245?d=identicon&s=25 Aníbal (Guest)
on 2007-02-19 14:05
(Received via mailing list)
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
http://www.rubycorner.com
http://www.hasmanydevelopers.com
This topic is locked and can not be replied to.