2017-02-10 90 views
12

任何想法/建議?gem install libv8 -v'5.3.332.38.1'...安裝libv8時出錯:錯誤:無法構建gem本機擴展

****此外更新:**** 2.3.1 agxxx-xxxight 2290-FIX-權利要求按鈕%紅寶石-e '使寶石:: Platform.local' x86_64的-達爾文-13

我有2臺機器,我想獲得的LIB V8 ....現在得到同樣的錯誤(無論達爾文訴)
1的Mac桌面電腦(與x86_64的-達爾文-13,但其他同darwin- 16)。最初,我認爲這個問題與達爾文-13有關,但現在不管這個問題如何)。


我已經嘗試了許多解決方案,從重新安裝&同時升級OSX和Xcode的。

的Mac OX塞拉利昂10.12.3 的Xcode 8.2.1

我看到類似的堆棧溢出,但提到rubyracer,不知道這是有關嗎? Error installing libv8: ERROR: Failed to build gem native extension

這裏是我的錯誤:

創業板安裝libv8 -v '5.3.332.38.1' 大廈原生擴展。這可能需要一段時間... 錯誤:安裝libv8時出錯: 錯誤:無法構建gem本機擴展。

current directory: /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/ext/libv8 
/Users/axxxsmith/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170209-5158-fzzx9o.rb extconf.rb 
creating Makefile 
Error: Command 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s v8/buildtools/mac/clang-format.sha1' returned non-zero exit status 1 in /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor 
Running: gclient root 
Running: gclient config --spec 'solutions = [ 
    { 
    "managed": False, 
    "name": "v8", 
    "url": "https://chromium.googlesource.com/v8/v8.git", 
    "custom_deps": {}, 
    "deps_file": "DEPS", 
    "safesync_url": "", 
    }, 
] 
' 
Running: gclient sync --with_branch_heads 
Traceback (most recent call last): 
    File "/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor/depot_tools/fetch.py", line 353, in <module> 
    sys.exit(main()) 
    File "/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor/depot_tools/fetch.py", line 348, in main 
    return run(options, spec, root) 
    File "/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor/depot_tools/fetch.py", line 342, in run 
    return checkout.init() 
    File "/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor/depot_tools/fetch.py", line 142, in init 
    self.run_gclient(*sync_cmd) 
    File "/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor/depot_tools/fetch.py", line 76, in run_gclient 
    return self.run(cmd_prefix + cmd, **kwargs) 
    File "/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/vendor/depot_tools/fetch.py", line 66, in run 
    return subprocess.check_output(cmd, **kwargs) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output 
    raise CalledProcessError(retcode, cmd, output=output) 
subprocess.CalledProcessError: Command '('gclient', 'sync', '--with_branch_heads')' returned non-zero exit status 2 
/Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/ext/libv8/builder.rb:106:in `block in setup_build_deps!': unable to fetch v8 source (RuntimeError) 
    from /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/ext/libv8/builder.rb:104:in `chdir' 
    from /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/ext/libv8/builder.rb:104:in `setup_build_deps!' 
    from /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/ext/libv8/builder.rb:60:in `build_libv8!' 
    from /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1/ext/libv8/location.rb:24:in `install!' 
    from extconf.rb:7:in `<main>' 

extconf failed, exit code 1 

Gem files will remain installed in /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/libv8-5.3.332.38.1 for inspection. 
Results logged to /Users/axxxsmith/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-13/2.3.0-static/libv8-5.3.332.38.1/gem_make.out 
+0

我最近升級到Mac Sierra(重新安裝我的硬盤),下載了Chrome和Google Drive的新版本。我想知道這是否與最新版本的Sierra不兼容?還有誰有相同的問題嗎? – user2970050

回答

7

試試這個(需要家釀):

brew install v8 
gem install libv8 -- --with-system-v8 

對於一個特定版本:

gem install libv8 -v '5.3.332.38.1' -- --with-system-v8 

但我假設的版本號將需要匹配任何家釀式版本的v8是。

+0

嗨 - 謝謝 - 這讓我經歷了這個問題。 – user2970050

+1

您還可以使用像therubyracer這樣的gem將您自己的v8 lib打包到您的應用程序中,以便您不依賴系統安裝 – engineerDave

相關問題