[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6678
  • Last Modified:

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:~$

0
smetterd
Asked:
smetterd
  • 2
  • 2
1 Solution
 
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
 
smetterdAuthor Commented:
Right on! Thx...

I did a "sudo apt-get install build-essential", which covers that, I think.
0
 
dberner9Commented:
sure does :)
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now