首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >libv8需要安装python2才能构建- Windows

libv8需要安装python2才能构建- Windows
EN

Stack Overflow用户
提问于 2013-06-27 15:01:01
回答 2查看 14.7K关注 0票数 15

因此,我试图在我的Windows上安装libv8:

代码语言:javascript
复制
D:\projects\perfstats>gem install libv8
Fetching: libv8-3.16.14.1.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

        D:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/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.16.14.1/ext/libv8/builder.rb:35:in `block in build_libv8!'
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:34:in `chdir'
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:34:in `build_libv8!'
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/location.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

我安装了python2.7并将其添加到路径中:

代码语言:javascript
复制
D:\projects\perfstats>python -V
Python 2.7.3

有什么办法解决这个问题吗?

EN

回答 2

Stack Overflow用户

发布于 2014-03-22 15:51:48

有一些方法可以解决这个问题,试着运行:gem libv8 -v '3.16.14.1‘-- with v8

或者我们像这样在Gemfile中把它们分开

代码语言:javascript
复制
group :production do
 gem 'libv8', '~> 3.11.8.3'
 gem 'therubyracer', :platform => :ruby
end

然后运行bundle命令: bundle安装开发或包安装--不需要生产。

票数 23
EN

Stack Overflow用户

发布于 2013-09-03 03:10:21

我在Windows上安装therubyracer时也遇到了同样的问题。

尝试安装GitHub包therubyracer并将v8.dll & v8preparser.dll复制到ruby\bin文件夹中。

这也将安装libv8 gem并解决您的问题。

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17346681

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档