2

I try install qtbindings gem on my new virtual machine. I did everything according to the instructions on gem page, but something is wrong. I have installation errors:

vagrant@machine:~$ sudo gem install qtbindings
Building native extensions.  This could take a while...
ERROR:  Error installing qtbindings:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb

make
mkdir ext/build
mkdir bin/1.9
mkdir bin/plugins
mkdir bin/plugins/accessible
mkdir bin/plugins/bearer
mkdir bin/plugins/codecs
mkdir bin/plugins/designer
mkdir bin/plugins/graphicssystems
mkdir bin/plugins/iconengines
mkdir bin/plugins/imageformats
mkdir bin/plugins/phonon_backend
mkdir bin/plugins/qmltooling
mkdir bin/plugins/sqldrivers
mkdir lib/1.9
cd ext/build; rm -rf CMakeFiles
cd ext/build; rm -rf generator
cd ext/build; rm -rf smoke
cd ext/build; rm -rf ruby
cd ext/build; rm *
rm: cannot remove '*': No such file or directory
make: [clean] Error 1 (ignored)
cd ext/build; \
cmake -DCMAKE_MINIMUM_REQUIRED_VERSION=2.6 \
-G "Unix Makefiles" \
-Wno-dev \
-DRUBY_EXECUTABLE=/usr/bin/ruby1.9.1 \
..
/bin/sh: 2: cmake: not found
make: [build] Error 127 (ignored)
cd ext/build; make
make[1]: Entering directory `/var/lib/gems/1.9.1/gems/qtbindings-4.8.6.3/ext/build'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/var/lib/gems/1.9.1/gems/qtbindings-4.8.6.3/ext/build'
make: *** [build] Error 2

Gem files will remain installed in /var/lib/gems/1.9.1/gems/qtbindings-4.8.6.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/qtbindings-4.8.6.3/./gem_make.out          

OS Ubunu 16.04. What i did wrong?

SOLVED

install cmake and qt-sdk

Thanks ajinkya-pisal

Community
  • 1
  • 1
alexin
  • 243
  • 1
  • 15
  • 2
    I believe that instructions on the qtbindings github are prettry straightforward. `On linux/MacOSX you must make sure you have all the necessary prerequisites installed or the compile will fail.` Also, error logs points that `cmake: not found`. Can you try installing `cmake` first and run `gem install qtbindings`? let me know if that fixex the issue or not – Ajinkya Pisal Apr 07 '17 at 23:00
  • Thanks for help. Install cmake, then install qt-sdk. It solved my problem. It was possible to install a smaller number of packages than qt-sdk with all dependencies. – alexin Apr 08 '17 at 10:14

1 Answers1

0

Of note, if you use multiple Ruby versions via RVM, you need to make sure you have 2.2.6 installed and selected. To check which versions you have installed, run

rvm list

If you do not have Ruby 2.2.6 installed, you will need to install it by running

rvm install 2.2.6

To select 2.2.6, run

rvm use 2.2.6

If it's a new installation, you'll also need to add 2.2.6 gems to your PATH. Do this by running

rvm get stable --auto-dotfiles