libv8(3.11.8.17)在Mac上捆绑安装错误

时间:2023-02-02 00:18:43

I upgraded ruby to 1.9.3, and now I can't get my server to start. When I run bundle install, it says

我将ruby升级到1.9.3,现在我无法启动服务器。当我运行bundle install时,它说

An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.

When I try to install that gem, it says

当我尝试安装那个宝石时,它说

ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

        /Users/Erica/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Using compiler: g++
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher

I'm an HTML/CSS coder, not really a Ruby developer, so any thoughts are really appreciated.

我是一个HTML / CSS编码器,不是真正的Ruby开发人员,所以任何想法都非常感激。

6 个解决方案

#1


29  

I resolved this issue by using the following command:

我使用以下命令解决了这个问题:

gem install libv8 -v 3.11.8.17 -- --with-system-v8

gem install libv8 -v 3.11.8.17 - --with-system-v8

It works with RVM on Mavericks.

它适用于Mavericks上的RVM。

https://*.com/a/19667419/763744

https://*.com/a/19667419/763744

#2


8  

Try reinstalling v8 in homebrew:

尝试在自制程序中重新安装v8:

gem uninstall libv8
brew install v8
gem install libv8

#3


3  

Do:

做:

gem install rmagick -v '2.13.2'
gem install libv8 -v 3.11.8.17 -- --with-system-v8

#4


0  

I encountered this problem a few times already, first thing I'd try is to (re)install command line tools. Normally should work.

我已经遇到过几次这个问题了,我首先尝试的是(重新)安装命令行工具。通常应该工作。

Another attempt that succeeded once was uninstalling libv8, and then installing it again. It takes ages...

另一次成功的尝试是卸载libv8,然后再次安装它。这需要很长时间......

#5


0  

I had this same problem when I upgraded from OSX Mountain Lion to OSX Mavericks.

当我从OSX Mountain Lion升级到OSX Mavericks时,我遇到了同样的问题。

Upgrading from ruby-1.8.7-p354 to ruby-1.8.7-375 did the trick for me.

从ruby-1.8.7-p354升级到ruby-1.8.7-375对我来说是个窍门。

libv8 (3.16.14.3-x86_64-darwin-13) and the therubyracer (0.12.0) gems installed without problem.

安装了libv8(3.16.14.3-x86_64-darwin-13)和therubyracer(0.12.0)宝石没有问题。

assuming you use rbenv:

假设你使用rbenv:

rbenv versions
  system
  * 1.8.7-p354
  2.0.0-rc2

rbenv uninstall 1.8.7-p354
rbenv install 1.8.7-p375

rbenv versions
  system
  * 1.8.7-p375
  2.0.0-rc2

bundle install

#6


-1  

This simple solution worked for me:

这个简单的解决方案对我有用:

$ gem uninstall libv8 # select "All Versions" if prompted
$ gem install libv8

#1


29  

I resolved this issue by using the following command:

我使用以下命令解决了这个问题:

gem install libv8 -v 3.11.8.17 -- --with-system-v8

gem install libv8 -v 3.11.8.17 - --with-system-v8

It works with RVM on Mavericks.

它适用于Mavericks上的RVM。

https://*.com/a/19667419/763744

https://*.com/a/19667419/763744

#2


8  

Try reinstalling v8 in homebrew:

尝试在自制程序中重新安装v8:

gem uninstall libv8
brew install v8
gem install libv8

#3


3  

Do:

做:

gem install rmagick -v '2.13.2'
gem install libv8 -v 3.11.8.17 -- --with-system-v8

#4


0  

I encountered this problem a few times already, first thing I'd try is to (re)install command line tools. Normally should work.

我已经遇到过几次这个问题了,我首先尝试的是(重新)安装命令行工具。通常应该工作。

Another attempt that succeeded once was uninstalling libv8, and then installing it again. It takes ages...

另一次成功的尝试是卸载libv8,然后再次安装它。这需要很长时间......

#5


0  

I had this same problem when I upgraded from OSX Mountain Lion to OSX Mavericks.

当我从OSX Mountain Lion升级到OSX Mavericks时,我遇到了同样的问题。

Upgrading from ruby-1.8.7-p354 to ruby-1.8.7-375 did the trick for me.

从ruby-1.8.7-p354升级到ruby-1.8.7-375对我来说是个窍门。

libv8 (3.16.14.3-x86_64-darwin-13) and the therubyracer (0.12.0) gems installed without problem.

安装了libv8(3.16.14.3-x86_64-darwin-13)和therubyracer(0.12.0)宝石没有问题。

assuming you use rbenv:

假设你使用rbenv:

rbenv versions
  system
  * 1.8.7-p354
  2.0.0-rc2

rbenv uninstall 1.8.7-p354
rbenv install 1.8.7-p375

rbenv versions
  system
  * 1.8.7-p375
  2.0.0-rc2

bundle install

#6


-1  

This simple solution worked for me:

这个简单的解决方案对我有用:

$ gem uninstall libv8 # select "All Versions" if prompted
$ gem install libv8