问题如下。
Error installing libv8:
ERROR: Failed to build gem native extension.
D:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system can not find the specified path
D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:49:in'setup_python!':libv8 requires python 2 to be installed in order to build,but it is currently not available (RuntimeError)
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:35:in 'block in build_libv8!'
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'chdir'
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'build_libv8!'
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'install!'
from extconf.rb:7: in '<main>'
I have installed the python27 and add the path.
python --version
Python 2.7.4然后我检查代码,如下所示。
def setup_python!
# If python v2 cannot be found in PATH,
# create a symbolic link to python2 the current directory and put it
# at the head of PATH. That way all commands that inherit this environment
# will use ./python -> python2
if python_version !~ /^2/
unless system 'which python2 2>&1 > /dev/null'
fail "libv8 requires python 2 to be installed in order to build, but it is currently #{python_version}"
end
`ln -fs #{`which python2`.chomp} python`
ENV['PATH'] = "#{File.expand_path '.'}:#{ENV['PATH']}"
end
end我尝试将Linux命令行安装到windows中,以便'ln -fs‘应该是working.But,这个问题仍然不能解决。
发布于 2013-09-06 08:30:21
试试这个:
gem install libv8 -v '3.11.8.17' -- --with-system-v8在我运行上面的命令之前,这个错误是一个痛苦的问题:)
发布于 2013-05-15 05:52:57
尝试使用https://github.com/eakmotion/therubyracer_for_windows。我已经用这个解决方案在我的windows机器上解决了同样的问题。
发布于 2013-06-26 04:49:51
请按照以下步骤操作:
使用以下命令
SET PATH=<ruby directory>;<python directory>路径(例如SET PATH=C:\Ruby192\bin;C:\Python27)现在安装你想要的宝石
gem install libv8从here获得此解决方案。
我想知道你是不是收到这个版本的错误。试试这个:
gem install libv8 --version 3.11.8.0 https://stackoverflow.com/questions/16514758
复制相似问题