I tried different Rubies and still can't install this gem. Ubuntu 16.10
duke@ostrov:~$ gem install therubyracer -v '0.10.2'
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/home/duke/.rvm/rubies/ruby-2.1.8/bin/ruby -r ./siteconf20161220-631-1qvqd0t.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling v8_locker.cpp
v8_locker.cpp: In function ‘VALUE {anonymous}::Lock::Delete(VALUE)’:
v8_locker.cpp:45:5: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
v8_locker.cpp: In function ‘VALUE {anonymous}::Unlock::Delete(VALUE)’:
v8_locker.cpp:85:5: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
compiling v8_weakref.cpp
compiling v8_value.cpp
v8_value.cpp:100:9: warning: ‘VALUE {anonymous}::ToInt32(VALUE)’ defined but not used [-Wunused-function]
VALUE ToInt32(VALUE self) {
^~~~~~~
compiling v8_script.cpp
compiling v8_array.cpp
compiling v8_handle.cpp
compiling v8_try_catch.cpp
v8_try_catch.cpp: In function ‘v8::TryCatch* {anonymous}::unwrap(VALUE)’:
v8_try_catch.cpp:15:14: error: cannot convert ‘bool’ to ‘v8::TryCatch*’ in return
return false;
^~~~~
Makefile:216: ошибка выполнения рецепта для цели «v8_try_catch.o»
make: *** [v8_try_catch.o] Ошибка 1
make failed, exit code 2
Gem files will remain installed in /home/duke/.rvm/gems/ruby-2.1.8/gems/therubyracer-0.10.2 for inspection.
Results logged to /home/duke/.rvm/gems/ruby-2.1.8/extensions/x86_64-linux/2.1.0/therubyracer-0.10.2/gem_make.out
I tried some other answers on related questions but nothing helps me. I am out of solutions.
This package contains the header files needed for extension libraries for Ruby 1.9.1. You need to install the ruby1.9.1-dev package by doing:
sudo apt-get install ruby1.9.1-dev
Generally it's easier to just do:
sudo apt-get install ruby-dev
I think that your problem is libv8
, so you should uninstall libv8
via command as bellow:
gem uninstall libv8
Then run gem install therubyracer -v '0.10.2'
again. It will work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.