Error when installing Mongrel Gem - ERROR: Failed to build gem native extension.

dallasray@justis:~$ sudo gem install mongrel mongrel_rails
Select which gem to install for your platform (i486-linux)
 1. mongrel 1.1.3 (java)
 2. mongrel 1.1.3 (i386-mswin32)
 3. mongrel 1.1.3 (ruby)
 4. mongrel 1.1.2 (ruby)
 5. mongrel 1.1.2 (mswin32)
 6. mongrel 1.1.2 (java)
 7. Skip this gem
 8. Cancel installation
> 4
Install required dependency fastthread? [Yn]  y
Select which gem to install for your platform (i486-linux)
 1. fastthread 1.0.1 (mswin32)
 2. fastthread 1.0.1 (ruby)
 3. Skip this gem
 4. Cancel installation
> 2
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

ruby extconf.rb install mongrel mongrel_rails
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
        from extconf.rb:1


Gem files will remain installed in /var/lib/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
dallasray@justis:~$

LVL 2
smetterdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

smetterdAuthor Commented:
I got past that error by doing a sudo apt-get install ruby1.8-dev package. But now I get this
-------

Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

ruby extconf.rb install mongrel
creating Makefile

make
cc -I. -I/usr/lib/ruby/1.8/i486-linux -I/usr/lib/ruby/1.8/i486-linux -I.  -fPIC -fno-strict-aliasing -g -O2  -fPIC  -c fastthread.c
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i486-linux/ruby.h:40:21: error: stdlib.h: No such file or directory
/usr/lib/ruby/1.8/i486-linux/ruby.h:44:21: error: string.h: No such file or directory
/usr/lib/ruby/1.8/i486-linux/ruby.h:54:19: error: stdio.h: No such file or directory
/usr/lib/ruby/1.8/i486-linux/ruby.h:71:20: error: alloca.h: No such file or directory
In file included from /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h:7,
                 from /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h:11,
                 from /usr/lib/ruby/1.8/i486-linux/ruby.h:91,
                 from fastthread.c:12:
/usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from /usr/lib/ruby/1.8/i486-linux/ruby.h:718,
                 from fastthread.c:12:
/usr/lib/ruby/1.8/i486-linux/missing.h:16:24: error: sys/time.h: No such file or directory
/usr/lib/ruby/1.8/i486-linux/missing.h:25:25: error: sys/types.h: No such file or directory
In file included from /usr/lib/ruby/1.8/i486-linux/ruby.h:719,
                 from fastthread.c:12:
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration specifiers or ... before fd_set
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration specifiers or ... before fd_set
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration specifiers or ... before fd_set
/usr/lib/ruby/1.8/i486-linux/intern.h:218: warning: struct timeval declared inside parameter list
/usr/lib/ruby/1.8/i486-linux/intern.h:218: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/lib/ruby/1.8/i486-linux/intern.h:219: warning: struct timeval declared inside parameter list
/usr/lib/ruby/1.8/i486-linux/intern.h:453: warning: parameter names (without types) in function declaration
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i486-linux/ruby.h:728:21: error: pthread.h: No such file or directory
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i486-linux/ruby.h:730: error: expected =, ,, ;, asm or __attribute__ before rb_nativethread_t
In file included from fastthread.c:13:
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration specifiers or ... before fd_set
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration specifiers or ... before fd_set
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration specifiers or ... before fd_set
/usr/lib/ruby/1.8/i486-linux/intern.h:218: warning: struct timeval declared inside parameter list
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: conflicting types for rb_thread_select
/usr/lib/ruby/1.8/i486-linux/intern.h:218: error: previous declaration of rb_thread_select was here
/usr/lib/ruby/1.8/i486-linux/intern.h:219: warning: struct timeval declared inside parameter list
/usr/lib/ruby/1.8/i486-linux/intern.h:219: error: conflicting types for rb_thread_wait_for
/usr/lib/ruby/1.8/i486-linux/intern.h:219: error: previous declaration of rb_thread_wait_for was here
/usr/lib/ruby/1.8/i486-linux/intern.h:453: warning: parameter names (without types) in function declaration
In file included from fastthread.c:14:
/usr/lib/ruby/1.8/i486-linux/rubysig.h:15:19: error: errno.h: No such file or directory
fastthread.c: In function wait_condvar:
fastthread.c:626: warning: passing argument 1 of rb_ensure from incompatible pointer type
make: *** [fastthread.o] Error 1


Gem files will remain installed in /var/lib/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
dallasray@justis:~$
0
dberner9Commented:
You need to install the libc6-dev package.

On debian-based systems that's "sudo apt-get install libc6-dev"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smetterdAuthor Commented:
Right on! Thx...

I did a "sudo apt-get install build-essential", which covers that, I think.
0
dberner9Commented:
sure does :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Ruby

From novice to tech pro — start learning today.