![](/img/trans.png)
[英]bundle install / Error in Installing libv8 (3.3.10.4) on rails (running on Lion)
[英]Installing libv8 for ree on Mountain Lion fails
我一直试图找到一个解决方案,现在几天没有运气。 如果有人在ML上成功安装REE 1.8.7的libv8 gem,你能告诉我你所遵循的过程吗?
我同时安装了XCode LLVM编译器以及用于10.7+ v2的kennethreitz GCC包。
尝试使用本机扩展安装时的输出是:
Building native extensions. This could take a while... ERROR: Error installing libv8: ERROR: Failed to build gem native extension. /Users/XXXXX/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb *** 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=/Users/XXXXX/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb:13: uninitialized constant Gem (NameError) Checking for Python... Gem files will remain installed in /Users/XXXXX/.rvm/gems/ree-1.8.7-2012.02/gems/libv8-3.3.10.4 for inspection. Results logged to /Users/XXXXX/.rvm/gems/ree-1.8.7-2012.02/gems/libv8-3.3.10.4/ext/libv8/gem_make.out
(记录的结果与错误完全相同)。
这对我有用。
RUBYOPT=-rrubygems gem install therubyracer
我能够在新安装的ree-1.8.7上成功地在Mountain Lion上安装libv8 gem。 我相信您所看到的问题源于使用的GCC版本。
正如现在在osx-gcc-installer的README中所描述的那样,你应该从Kenneth Reitz的LLVM版本的GCC切换到可以通过Homebrew或Macports获得的GCC 4.2。
自制的说明: http : //coderwall.com/p/dtbuqg
MacPorts说明: http : //coderwall.com/p/pagj2w
请注意,您将需要设置CC路径并按照这些文章中的描述建立必要的符号链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.