Ruby-on-rails 错误:安装 capybara-webkit 时出错:
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11354656/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ERROR: Error installing capybara-webkit:
提问by Michael Durrant
Any suggestions on how to fix?
有关如何修复的任何建议?
gem install capybara-webkit -v '0.11.0'
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/home/durrantm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
sh: qmake: not found
Gem files will remain installed in /home/durrantm/.rvm/gems/ruby-1.9.3-p194/gems/capybara-webkit-0.11.0 for inspection.
Results logged to /home/durrantm/.rvm/gems/ruby-1.9.3-p194/gems/capybara-webkit-0.11.0/./gem_make.out
回答by sites
If you are in Ubuntu do
如果你在 Ubuntu 中
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
If you are on Mac
如果你在 Mac 上
brew install qt
and then
进而
gem install capybara-webkit -v '0.11.0'
回答by ujjayini dutta
For Ubuntu 16.04
对于 Ubuntu 16.04
sudo apt-get install qt-sdk
sudo apt-get install qt-sdk
Followed by
其次是
gem install capybara-webkit -v '1.11.0'or replace with whatever version you want to install.
gem install capybara-webkit -v '1.11.0'或替换为您要安装的任何版本。
回答by Tanzeeb Khalili
You are probably missing the qt libraries. See the capybara-webkit wikifor instructions on installing them for your platform.
您可能缺少 qt 库。有关为您的平台安装它们的说明,请参阅capybara-webkit wiki。
回答by Waynn Lue
brew install qtwill only install (as of August 4, 2015) 4.8.6, which gives you this message.
brew install qt将仅安装 (截至 2015 年 8 月 4 日) 4.8.6,它会为您提供此消息。
WARNING: The next major version of capybara-webkit will require at least version 5.0 of Qt. You're using version 4.8.6.
Instead, if you do
相反,如果你这样做
brew install qt5
brew link --force qt5
you won't get that error.
你不会得到那个错误。
回答by Yuxuan Chen
回答by Chiara Ani
On fedora is a bit more complicated. I did the next which takes a while:
在 Fedora 上有点复杂。我做了下一个需要一段时间的:
$ sudo dnf install make gcc-c++ gdb qt5*-devel qt-creator
$ export QMAKE=/usr/bin/qmake-qt5
$ gem install capybara-webkit
Then it worked!
然后它起作用了!

