我安装了Qt 4.8.5,这是capybara-webkit所要求的,但由于某些原因,我的系统似乎认为我还在使用4.7.x。
我删除了/ Developer / Applications中的4.7.x-删除/ Developer / Applications,因为Apple的开发人员工具不再使用该位置,所以Qt 4.7.x是唯一存在的。
我在删除Qt 4.7.x后重新安装了Qt 4.8.5,并尝试安装了capybara-webkit,但没有骰子:
$ brew reinstall qt4
==> Reinstalling qt4
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.5.mavericks.bottle.
Already downloaded: /Library/Caches/Homebrew/qt-4.8.5.mavericks.bottle.4.tar.gz
==> Pouring qt-4.8.5.mavericks.bottle.4.tar.gz
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
.app bundles were installed to /usr/local/Cellar/qt/4.8.5 (or libexec).
Run `brew linkapps` to symlink these to /Applications.
==> Summary
/usr/local/Cellar/qt/4.8.5: 2780 files, 120M
$ gem install capybara-webkit -v '1.1.1'
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/Users/brandon/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
cd src/ && /usr/bin/qmake /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
Project ERROR: At least Qt 4.8.0 is required to run capybara-webkit.
make: *** [sub-src-webkit_server-pro-qmake_all] Error 2
Command 'make qmake' failed
make "DESTDIR=" clean
cd src/ && /usr/bin/qmake /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
Project ERROR: At least Qt 4.8.0 is required to run capybara-webkit.
make: *** [src/Makefile.webkit_server] Error 2
make "DESTDIR="
cd src/ && /usr/bin/qmake /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
Project ERROR: At least Qt 4.8.0 is required to run capybara-webkit.
make: *** [src/Makefile.webkit_server] Error 2
make failed, exit code 2
Gem files will remain installed in /Users/brandon/.rvm/gems/ruby-2.0.0-p353/gems/capybara-webkit-1.1.1 for inspection.
Results logged to /Users/brandon/.rvm/gems/ruby-2.0.0-p353/extensions/x86_64-darwin-12/2.0.0-static/capybara-webkit-1.1.1/gem_make.out
如果我运行brew linkapps
,它会在/ Applications中为* .App文件创建符号链接,但它似乎没有做任何与capybara-webkit安装相关的事情。我不确定应该在哪里链接,或者如果这是问题,但其他Homebrew安装的软件似乎与/usr/local/bin/
相关联。然而,那里似乎没有任何与Qt相关的东西:
$ ls /usr/local/bin/q*
/usr/local/bin/qcollectiongenerator /usr/local/bin/qmake
/usr/local/bin/qdoc3 /usr/local/bin/qmlplugindump
/usr/local/bin/qhelpgenerator /usr/local/bin/qt3to4
有什么问题?我该如何解决?
答案 0 :(得分:4)
问题似乎是PATH中的第一个qmake
是4.7版本的符号链接:
$ ls -hal `which qmake`
lrwxr-xr-x 1 507 wheel 9B Aug 8 2012 /usr/bin/qmake -> qmake-4.7
在删除之后(sudo rm /usr/bin/qmake
),使用的qmake
版本是正确的:
$ which qmake
/usr/local/bin/qmake
现在我可以成功安装capybara-webkit:
$ gem install capybara-webkit -v '1.1.1'
Building native extensions. This could take a while...
Successfully installed capybara-webkit-1.1.1
Parsing documentation for capybara-webkit-1.1.1
Installing ri documentation for capybara-webkit-1.1.1
Done installing documentation for capybara-webkit after 1 seconds
1 gem installed