ERROR: Error installing capybara-webkit:

2019-01-21 01:46发布

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

5条回答
Juvenile、少年°
2楼-- · 2019-01-21 01:51

You are probably missing the qt libraries. See the capybara-webkit wiki for instructions on installing them for your platform.

查看更多
成全新的幸福
3楼-- · 2019-01-21 01:54

If you are in Ubuntu do

sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui

If you are on Mac

brew install qt

and then

gem install capybara-webkit -v '0.11.0'
查看更多
beautiful°
4楼-- · 2019-01-21 01:57

For Ubuntu 16.04

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.

查看更多
唯我独甜
5楼-- · 2019-01-21 02:08

brew install qt will only install (as of August 4, 2015) 4.8.6, which gives you this message.

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.

查看更多
三岁会撩人
6楼-- · 2019-01-21 02:14

On El Capitan or Yosemite, you may need to do brew install qt55 according to the doc here.

查看更多
登录 后发表回答