Installing Ruby on Linux - Error

C

Centipeed

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?
 
S

SonOfLilit

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
 
T

Timothy Hunter

Centipeed said:
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?
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.
 
K

Ken Bloom

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.

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
 
J

Jan Svitok

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.

Right. It's called build-essential.
 
M

M. Edward (Ed) Borasky

Timothy said:
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.
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. :)
 
A

Aníbal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top