新手问题 gem therubyracer 和 libv8 的安装问题

somejump · 2014年12月11日 · 最后由 lgn21st 回复于 2014年12月12日 · 7103 次阅读

本人小白,如果已经有人问过了这个问题,真的是不是我故意问的,是因为我无法通过本站的谷歌搜索。若有人问过了,××附上以前的问题链接××就行了。

-- gem install therubyracer -v '0.12.1'
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.
    /home/myname/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for main() in -lpthread... 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=/home/zhengjinyang/.rvm/rubies/ruby-2.1.1/bin/ruby
    --with-pthreadlib
    --without-pthreadlib
    --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
/home/myname/.rvm/gems/ruby-2.1.1/gems/libv8-3.16.14.7/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.7 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

    from /home/myname/.rvm/gems/ruby-2.1.1/gems/libv8-3.16.14.7/lib/libv8.rb:7:in `configure_makefile'
    from extconf.rb:32:in `<main>'

extconf failed, exit code 1

没错,我是使用了系统自带的 libv8,这是因为如果不那样我安装 libv8 都要报错 错误就像上面那样:Failed to build gem native extension. 网上给的装上 libv8 的方法是加上 -- --with-system-v8 但是这明显指标不治本 求助呀,难道我要重装 rails 了么?

*** 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.

检查下 mkmf.log 错误报告,也可以去 stackoverflow 搜看看..

需要 登录 后方可回复, 如果你还没有账号请 注册新账号