Andrey Drozdov Andrey Drozdov - 5 months ago 25
Ruby Question

qtbindings mac install error

I've try to install qtbindings to my iMac, using this command in terminal:

gem install qtbindings


And I con't get there result. I think it was install incorrect. Well, this is what I get as a result:

iMac-Andrii-3:~ Zayac$ gem install qtbindings
Building native extensions. This could take a while...
ERROR: Error installing qtbindings:
ERROR: Failed to build gem native extension.

current directory: /Users/Zayac/.rvm/gems/ruby-2.3.0/gems/qtbindings-4.8.6.2
/Users/Zayac/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160613-44635-xuhugd.rb extconf.rb

current directory: /Users/Zayac/.rvm/gems/ruby-2.3.0/gems/qtbindings-4.8.6.2
make "DESTDIR=" clean
mkdir ext/build
mkdir bin/2.3
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/2.3
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: *: No such file or directory
make: [clean] Error 1 (ignored)

current directory: /Users/Zayac/.rvm/gems/ruby-2.3.0/gems/qtbindings-4.8.6.2
make "DESTDIR="
mkdir ext/build
mkdir: ext/build: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/2.3
mkdir: bin/2.3: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins
mkdir: bin/plugins: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/accessible
mkdir: bin/plugins/accessible: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/bearer
mkdir: bin/plugins/bearer: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/codecs
mkdir: bin/plugins/codecs: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/designer
mkdir: bin/plugins/designer: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/graphicssystems
mkdir: bin/plugins/graphicssystems: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/iconengines
mkdir: bin/plugins/iconengines: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/imageformats
mkdir: bin/plugins/imageformats: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/phonon_backend
mkdir: bin/plugins/phonon_backend: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/qmltooling
mkdir: bin/plugins/qmltooling: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/sqldrivers
mkdir: bin/plugins/sqldrivers: File exists
make: [makedirs] Error 1 (ignored)
mkdir lib/2.3
mkdir: lib/2.3: File exists
make: [makedirs] Error 1 (ignored)
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: *: 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=/Users/Zayac/.rvm/rubies/ruby-2.3.0/bin/ruby \
..
/bin/sh: cmake: command not found
make: [build] Error 127 (ignored)
cd ext/build; make
make[1]: *** No targets specified and no makefile found. Stop.
make: *** [build] Error 2

make failed, exit code 2

Gem files will remain installed in /Users/Zayac/.rvm/gems/ruby-2.3.0/gems/qtbindings-4.8.6.2 for inspection.
Results logged to /Users/Zayac/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-15/2.3.0/qtbindings-4.8.6.2/gem_make.out


I don't know is you need it for help, but: OS X - latest version, Xcode installed (latest version), ruby installed via rvm (as default and active 2.3.0), rails installed (v.4.2.6).

How can I install qtbindings?

Answer

The answer to my question was pretty easy. Hope it will help others.

To install qtbindings and Qt4 you have to do.

Open the terminal on your Mac OS X and type:

First step:

brew install make

Second step:

brew install qt

Third step:

gem install qtbindings

It must solve all the problems.