Gem::Ext::BuildError: ERROR: Failed to build gem native extension. on installing therubyracer 0.12.2 with native extensions

0

I tried all the method given like uninstall libv8 and then install therubyracer, nothing work for me ,can anyone help me to solve this issue?


$ sudo gem install therubyracer -v '0.12.2' --source 'http://rubygems.org/'




Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /Users/letsventure/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20191111-5081-xr5qij.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... 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:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/letsventure/.rbenv/versions/2.2.4/bin/$(RUBY_BASE_NAME)
    --with-pthreadlib
    --without-pthreadlib
    --with-objclib
    --without-objclib
    --enable-debug
    --disable-debug
    --with-v8-dir
    --without-v8-dir
    --with-v8-include
    --without-v8-include=${v8-dir}/include
    --with-v8-lib
    --without-v8-lib=${v8-dir}/lib
/Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version  (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with 
the libv8 rubygem. 

However, your system version of v8 could not be located. 

Please make sure your system version of v8 that is compatible 
with 3.16.14.19 installed. You may need to use the 
--with-v8-dir option if it is installed in a non-standard location
    from /Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.19/lib/libv8.rb:7:in `configure_makefile'
    from extconf.rb:32:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-19/2.2.0-static/therubyracer-0.12.2/gem_make.out

anand

Posted 2019-11-11T10:11:37.370

Reputation: 1

No answers