2016-11-08 73 views
6

我一直在試圖安裝與打捆的水豚,Webkit的寶石,並按照下列指示後:https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#macos-sierra-1012無法安裝水豚,WebKit的與OS X塞拉利昂

我一直運行到Makefile中的錯誤不被發現。我已經更新了Homebrew,寶石系統,並用cli工具更新了Xcode 8,但無濟於事。非常感謝任何幫助!

sudo gem install capybara-webkit PATH=/Users/caren/Qt5.5.1/5.5/clang_64/bin:$PATH gem install capybara-webkit 
Password: 
Building native extensions. This could take a while... 
ERROR: Error installing capybara-webkit: 
    ERROR: Failed to build gem native extension. 

    /Users/caren/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20161108-5610-m00680.rb 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/caren/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME) 
    --with-gl-dir 
    --without-gl-dir 
    --with-gl-include 
    --without-gl-include=${gl-dir}/include 
    --with-gl-lib 
    --without-gl-lib=${gl-dir}/lib 
    --with-zlib-dir 
    --without-zlib-dir 
    --with-zlib-include 
    --without-zlib-include=${zlib-dir}/include 
    --with-zlib-lib 
    --without-zlib-lib=${zlib-dir}/lib 
Command 'qmake ' not available 

extconf failed, exit code 1 

Gem files will remain installed in /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.11.1 for inspection. 
Results logged to /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.11.1/gem_make.out 
ERROR: Could not find a valid gem 'PATH=/Users/caren/Qt5.5.1/5.5/clang_64/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/caren/.nvm/versions/node/v5.4.0/bin:/Users/caren/.rbenv/shims:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/heroku/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin:/Users/caren/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin' (>= 0) in any repository 
ERROR: Could not find a valid gem 'gem' (>= 0) in any repository 
ERROR: Could not find a valid gem 'install' (>= 0) in any repository 
ERROR: Possible alternatives: installr, instant, instana, instacli, instapi 
Building native extensions. This could take a while... 
ERROR: Error installing capybara-webkit: 
    ERROR: Failed to build gem native extension. 

    /Users/caren/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20161108-5610-97n2eh.rb 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/caren/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME) 
    --with-gl-dir 
    --without-gl-dir 
    --with-gl-include 
    --without-gl-include=${gl-dir}/include 
    --with-gl-lib 
    --without-gl-lib=${gl-dir}/lib 
    --with-zlib-dir 
    --without-zlib-dir 
    --with-zlib-include 
    --without-zlib-include=${zlib-dir}/include 
    --with-zlib-lib 
    --without-zlib-lib=${zlib-dir}/lib 
Command 'qmake ' not available 

extconf failed, exit code 1 

Gem files will remain installed in /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/capybara-webkit-1.11.1 for inspection. 
Results logged to /Users/caren/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.11.1/gem_make.out 
+0

你是怎麼安裝QT的? – fabersky

+0

你應該運行'PATH =/Users/caren/Qt5.5.1/5.5/clang_64/bin:$ PATH gem install capybara-webkit'' gem install capybara-webkit PATH =/Users/caren/Qt5.5.1/5.5/clang_64/bin:$ PATH gem install capybara-webkit'以及/如果失敗,請查看錯誤消息中提到的mkmf.log以查看發生了什麼錯誤 –

+1

http://superuser.com/questions/256232/how -can-i-get-qmake-on-mac-os-x –

回答

9

以下的伎倆,我(用自制):

brew install qt5 --with-qtwebkit 
brew link --force qt5 
gem install capybara-webkit 

注:這將需要一段時間才能安裝第一步,你需要安裝的Xcode。

+1

謝謝邁克!嘗試了你的步驟,併爲我解決。 :) –

+0

謝謝隊友!花了很長時間編譯/製作,但確實解決了。許多榮譽! :) – Autodidact

+0

不要開玩笑,這需要很長的時間。所有3個命令都像一個迷人的工作!謝了哥們!! – LuAndre