2012-05-07 4 views
6

私は数日間、これについての解決策を見つけようと努力してきました。誰かがMLでREE 1.8.7用のlibv8 gemをインストールするのに成功したなら、あなたが従ったプロセスを教えてください。マウンテンライオンのためのlibv8のインストールに失敗しました

私は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

(ログイン結果はエラーとまったく同じです)。

+0

私は同じ問題があります。まだ運がない? – gdavis

答えて

1

新しくインストールしたree-1.8.7で、Mountain Lionにlibv8 gemを正常にインストールできました。あなたが見ている問題は、GCCのバージョンが使用されていることに起因していると思います。

osx-gcc-installer's READMEで今説明したように、Kenneth ReitzのLLVMバージョンのGCCからHomebrewまたはMacports経由で入手できるGCC 4.2に切り替える必要があります。

自作の手順: http://coderwall.com/p/dtbuqg

MacPortsの命令:あなたはCCのパスを設定し、それらの記事で説明したように、必要なシンボリックリンクを確立することになるでしょう http://coderwall.com/p/pagj2w

注意。

+0

ねえケニー。どのバージョンのlibv8とthebyracerを正常にインストールできましたか?そしてこれはgcc-4.2を使っていましたか? –

4

これは私のために働いた。

RUBYOPT=-rrubygems gem install therubyracer 
関連する問題