如果这看起来像一个重复的问题,但“难倒”是这个词,请道歉。
感谢主给了这个地方。(和贡献者)
我已按照与此相关的 Stackoverflow 问题中的所有说明进行操作。我在工作和晚上都度过了无数个小时。过去,我已经在 Ubuntu/Debian 机器上成功安装并使用了这个 gem,包括在基于谷歌云的 Debian 实例上无头。
我已使用 brew 遵循以下站点的说明。 https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#macos-sierra-1012
$ brew install qt@5.5 --with-qtwebkit
结果是
Warning: qt: this formula has no --with-qtwebkit option so it will be ignored!
==> Downloading https://homebrew.bintray.com/bottles/qt@5.5-5.5.1_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
$ which qmake
给
/usr/local/opt/qt@5.5/bin/qmake
然后我跑
$ brew link --force qt@5.5
然后我跑
~$ QMAKE=/usr/local/opt/qt@5.5/bin/qmake gem install capybara-webkit -v '1.14.0'
我已经通过 App Store 成功安装了 Xcode。
但尽我所能......
~$ QMAKE=/usr/local/opt/qt@5.5/bin/qmake gem install capybara-webkit -v '1.14.0'
仅导致以下输出。
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
current directory: /Users/matthew/.rbenv/versions/2.4.1/gemsets/video-store/gems/capybara-webkit-1.14.0
/Users/matthewrentz/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20180504-16518-1q3n536.rb extconf.rb
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
*** 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/matthew/.rbenv/versions/2.4.1/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 '/usr/local/opt/qt@5.5/bin/qmake ' failed
extconf failed, exit code 1
Gem files will remain installed in /Users/matthew/.rbenv/versions/2.4.1/gemsets/video-store/gems/capybara-webkit-1.14.0 for inspection.
Results logged to /Users/matthew/.rbenv/versions/2.4.1/gemsets/video-store/extensions/x86_64-darwin-17/2.4.0-static/capybara-webkit-1.14.0/gem_make.out
我已经运行了上述输出中包含的建议
$ /usr/bin/xcodebuild
这使
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
$ 回声 $PATH
给出 /Users/matthew/.rbenv/bin:/Users/matthew/.rbenv/shims:/usr/local/opt/qt@5.5/bin:/Users/matthew/.rbenv/shims:/usr/local/bin :/usr/bin:/bin:/usr/sbin:/sbin
至于线……
Check the mkmf.log file for more details.
如果我知道在哪里可以找到它,我很乐意。我想它存在于文件系统的某个地方?
任何帮助深表感谢。从我的声望来看,我还是很绿的。如果无法使其正常工作,我将无法继续。
感谢这个地方的所有贡献者。
干杯