qtbindings mac安装错误

时间:2016-06-13 20:13:52

标签: ruby macos rubygems

我尝试在终端中使用此命令将qtbindings安装到我的iMac:

gem install qtbindings

我无法得到结果。我认为这是安装不正确。嗯,这就是我得到的结果:

    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

我不知道你需要它的帮助,但是:OS X - 最新版本,Xcode安装(最新版本),ruby通过rvm安装(默认和活动2.3.0),安装了rails(v.4.2) 0.6)。

如何安装qtbindings?

2 个答案:

答案 0 :(得分:1)

我的问题的答案非常简单。希望它能帮助别人。

要安装qtbindings和Qt4,你必须这样做。

在Mac OS X上打开终端并输入:

第一步:

brew install cmake

第二步:

brew install qt

第三步:

gem install qtbindings

它必须解决所有问题。

答案 1 :(得分:0)

似乎缺少cmake - 我是通过brew install cmake安装的。