I am trying to install therubyracer on my centos server and I have problems with hella.
$ gem install therubyracer Building native extensions. This could take a while... ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb checking for main() in -lpthread... yes checking for v8.h... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options:
So, I tried to install this:
[ root@allthingswebdesign current]
Output from which g ++
$ which g++ /usr/bin/g++ $ /usr/bin/g++ --version g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [ root@allthingswebdesign current]
Information you requested:
[ root@allthingswebdesign node-v0.8.15]
EDIT After using the @Chris solution, I now installed libv8 for installation, but therubyracer still does not install and gives me this:
[ root@allthingswebdesign famnfo.com]# gem install therubyracer Fetching: therubyracer-0.11.0.gem (100%) Building native extensions. This could take a while... ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb checking for main() in -lpthread... yes creating Makefile make compiling accessor.cc accessor.cc:181:2: warning: no newline at end of file compiling array.cc array.cc:26:2: warning: no newline at end of file compiling backref.cc backref.cc:45:2: warning: no newline at end of file compiling constants.cc constants.cc:34:2: warning: no newline at end of file compiling constraints.cc constraints.cc:52:2: warning: no newline at end of file compiling context.cc compiling date.cc date.cc:18:2: warning: no newline at end of file compiling exception.cc exception.cc:38:2: warning: no newline at end of file compiling external.cc external.cc:43:2: warning: no newline at end of file compiling function.cc function.cc:58:2: warning: no newline at end of file compiling gc.cc gc.cc:43:2: warning: no newline at end of file compiling handles.cc handles.cc:34:2: warning: no newline at end of file compiling heap.cc heap.cc:31:2: warning: no newline at end of file compiling init.cc init.cc:39:2: warning: no newline at end of file compiling invocation.cc invocation.cc:86:2: warning: no newline at end of file compiling locker.cc locker.cc:77:2: warning: no newline at end of file compiling message.cc message.cc:51:2: warning: no newline at end of file compiling object.cc object.cc:334:2: warning: no newline at end of file compiling primitive.cc primitive.cc:8:2: warning: no newline at end of file compiling rr.cc rr.cc:83:2: warning: no newline at end of file compiling script.cc script.cc:80:17: warning: no newline at end of file compiling signature.cc signature.cc:18:2: warning: no newline at end of file compiling stack.cc stack.cc:76:2: warning: no newline at end of file compiling string.cc string.cc:47:17: warning: no newline at end of file compiling template.cc template.cc:175:2: warning: no newline at end of file compiling trycatch.cc trycatch.cc:87:2: warning: no newline at end of file compiling v8.cc v8.cc:87:2: warning: no newline at end of file compiling value.cc value.cc:239:2: warning: no newline at end of file linking shared-object v8/init.so /usr/bin/ld:/usr/local/rvm/gems/ruby-1.9.3-p125/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a: file format not recognized; treating as linker script /usr/bin/ld:/usr/local/rvm/gems/ruby-1.9.3-p125/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a:1: syntax error collect2: ld returned 1 exit status make: *** [init.so] Error 1 Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p125/gems/therubyracer-0.11.0 for inspection. Results logged to /usr/local/rvm/gems/ruby-1.9.3-p125/gems/therubyracer-0.11.0/ext/v8/gem_make.out
source share