ERROR: Error installing capybara-webkit:
Asked Answered
J

7

118

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
Junitajunius answered 6/7, 2012 at 1:14 Comment(1)
What platform are you trying to install capybara-webkit on?Cobaltite
O
218

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'
Overdraft answered 23/7, 2012 at 23:50 Comment(9)
I had to export QMAKE=/usr/bin/qmake-qt4 on RHEL6.Microcircuit
I already had qt installed and it was still failing. Make sure that you uninstall qt and reinstall it if this is the case for you. The latest version of Capybara should work on the latest version of Mavericks on Macs.Gaullism
Worked for me on os x YosemiteDahlia
Similar issue, but since I used brew I needed to supply a path to where qt5 is installed. export QMAKE=/usr/local/Cellar/qt5/5.5.1_1/bin/qmakeAmathist
For Mac see Waynn Lue's comment belowHorary
On alpine please use apk search qt4 or apk search qt5 and install whatever you need using apk add [name without version]Attain
I had to brew link qt --forceHartwig
In case of ubuntu, if you get an error Unable to locate package then run following command instead mentioned above: sudo apt-get install libqt4-dev libqtwebkit-dev This will do the job.Mokpo
For Ubuntu 18.04: sudo apt-get install qt4-dev-tools libqt4-dev libqtcore4 libqtgui4 libqt4-dev libqtwebkit-devThaumaturgy
E
21

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.

Emeliaemelin answered 29/7, 2016 at 7:19 Comment(1)
Worked for me as well on Ubuntu 16.10Boater
H
16

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

Hennahane answered 11/7, 2012 at 5:51 Comment(0)
M
5

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.

Metalline answered 5/8, 2015 at 1:7 Comment(0)
R
4

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

Rufford answered 22/6, 2016 at 22:50 Comment(1)
Note that if you want to install version 5.5 specifically, you will now need to do brew install homebrew/versions/qt55.Hahn
P
1

For Ubuntu 20.04 you can install qt5-default package

sudo apt-get install g++ qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x

Then install the gem with the required version:

gem install capybara-webkit -v '1.11.0'
Pachyderm answered 29/6, 2020 at 10:22 Comment(1)
Still works in 2022!Camion
L
0

On fedora is a bit more complicated. I did the next which takes a while:

$ sudo dnf install make gcc-c++ gdb qt5*-devel qt-creator
$ export QMAKE=/usr/bin/qmake-qt5
$ gem install capybara-webkit

Then it worked!

See more info on capybara-webkit wiki

Laodicea answered 21/11, 2019 at 12:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.