在 Ubuntu 18.04 上安装 Capybara Webkit 1.15.1

在 Ubuntu 18.04 上安装 Capybara Webkit 1.15.1

ubuntu 18.04,,rails 5.0capybara-webkit 1.15.1

我将一个 rails 应用程序克隆到我的 Ubuntu 18.04 桌面上。当我这样做时,bundle我收到一个错误:

An error occurred while installing capybara-webkit (1.15.1), and Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '1.15.1' --source 'https://rubygems.org/'` succeeds before bundling

当我运行建议的命令时,我得到了以下信息:

gem install capybara-webkit -v '1.15.1' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR:  Error installing capybara-webkit:
    ERROR: Failed to build gem native extension.

    current directory: /home/jdc44/.rvm/gems/ruby-2.5.1/gems/capybara-webkit-1.15.1
/usr/share/rvm/rubies/ruby-2.5.1/bin/ruby -r ./siteconf20191107-19251-10hohh1.rb extconf.rb
*** 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=/usr/share/rvm/rubies/ruby-2.5.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 'qmake ' not available

extconf failed, exit code 1

Google 有很多提示,但我试过都没用。我找到了一个网站,上面提到了安装[email protected]

brew install [email protected]
...
Error: No available formula with the name "[email protected]"

调查后我发现:

sudo apt-get install g++ qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libqt5webkit5-dev is already the newest version (5.212.0~alpha2-7ubuntu1).
g++ is already the newest version (4:7.4.0-1ubuntu2.3).
gstreamer1.0-plugins-base is already the newest version (1.14.5-0ubuntu1~18.04.1).
gstreamer1.0-tools is already the newest version (1.14.5-0ubuntu1~18.04.1).
gstreamer1.0-x is already the newest version (1.14.5-0ubuntu1~18.04.1).
qt5-default is already the newest version (5.9.5+dfsg-0ubuntu2.3).
The following packages were automatically installed and are no longer required:
  libllvm7 libpython-all-dev libpython-dev libpython2.7-dev python-all python-asn1crypto python-cffi-backend
  python-cryptography python-dbus python-enum34 python-gi python-idna python-ipaddress python-keyring
  python-keyrings.alt python-secretstorage python-six python-wheel python-xdg python2.7-dev
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.

看起来我已经qt5安装了,但我仍然无法安装capybara-webkit 1.15.1

帮助?

答案1

您可以通过 apt 安装 qt-sdk

sudo apt-get install qt-sdk

相关内容