今天新加入一个项目 GemLock 中指定的libv8的版本是3.16.14.5,怎么都装不了
贴上错误:
==>ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.5
Using compiler: /usr/bin/c++ (GCC version 4.8.3)
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:28:in `make_flags': undefined method `include?' for nil:NilClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:56:in `block in build_libv8!'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:49:in `chdir'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:49:in `build_libv8!'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.0.0-p247/extensions/x86_64-linux/2.0.0/libv8-3.16.14.5/gem_make.out
后来看了网上下gem文件夹下
libv8-3.16.14.3-x86_64-linux
libv8-3.16.14.5
libv8-3.16.14.7-x86_64-linux
之前装的libv8都有后缀 linux后缀 本人操作系统64位Fedora 猜想与操作系统有关
网上找到一条命令:gem install libv8-3.11.8.17.gem -- --with-system-v8
最后根据提示修改用解决: gem install libv8 -v '3.16.14.5' -- --with-system-v8这条命令 成功安装
]# gem install libv8 -v '3.16.14.5' -- --with-system-v8
Building native extensions with: '--with-system-v8'
This could take a while...
Successfully installed libv8-3.16.14.5
Parsing documentation for libv8-3.16.14.5
Installing ri documentation for libv8-3.16.14.5
Done installing documentation for libv8 after 0 seconds
1 gem installed