3

我正在尝试安装 capybara-webkit。在赢得 XP。有安装gem,ruby1.9.3 qt5.1.0 和jasmine。一切都安装得很完美,但是当我尝试安装 capybara-webkit 时出现错误:

    C:\Documents and Settings\XPMUser>gem install capybara-webkit
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
Command 'qmake -spec win32-g++' not available

有谁知道出了什么问题以及如何解决。

问题出在 PATH 上,但现在还有其他问题:

C:\Program Files\ConEmu>gem install capybara-webkit
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing capybara-webkit:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
cd src/ && ( test -e Makefile.webkit_server || c:/Qt/5.1.0/msvc2010/bin/qmake.ex
e C:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0/src/webkit_server.pr
o -spec win32-g++ -o Makefile.webkit_server ) && make -f Makefile.webkit_server

make[1]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit
-1.0.0/src'
make -f Makefile.webkit_server.Release
make[2]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit
-1.0.0/src'
g++ -x c++-header -c -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -
fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_QUICK_
LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WEBKIT_LIB -DQT_QML_LIB -DQT_WIDG
ETS_LIB -DQT_SENSORS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL
_ES_2 -DQT_OPENGL_ES_2_ANGLE -I. -I'../../../../../../../../Qt/5.1.0/msvc2010/in
clude' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/QtWebKitWidgets' -I'
../../../../../../../../Qt/5.1.0/msvc2010/include/QtQuick' -I'../../../../../../
../../Qt/5.1.0/msvc2010/include/QtOpenGL' -I'../../../../../../../../Qt/5.1.0/ms
vc2010/include/QtPrintSupport' -I'../../../../../../../../Qt/5.1.0/msvc2010/incl
ude/QtWebKit' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/QtQml' -I'../
../../../../../../../Qt/5.1.0/msvc2010/include/QtWidgets' -I'../../../../../../.
./../Qt/5.1.0/msvc2010/include/QtSensors' -I'../../../../../../../../Qt/5.1.0/ms

vc2010/include/QtNetwork' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/Q
tGui' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/QtANGLE' -I'../../../
../../../../../Qt/5.1.0/msvc2010/include/QtCore' -I'release' -I'../../../../../.
./../../Qt/5.1.0/msvc2010/mkspecs/win32-g++' -o release/stable.h.gch/c++ stable.
h
cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport
"
make[2]: *** [release/stable.h.gch/c++] Error 1
make[2]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-
1.0.0/src'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-
1.0.0/src'
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2
Command 'make' failed

make
cd src/ && ( test -e Makefile.webkit_server || c:/Qt/5.1.0/msvc2010/bin/qmake.ex
e C:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-1.0.0/src/webkit_server.pr
o -spec win32-g++ -o Makefile.webkit_server ) && make -f Makefile.webkit_server

make[1]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit
-1.0.0/src'
make -f Makefile.webkit_server.Release
make[2]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit
-1.0.0/src'
g++ -x c++-header -c -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -
fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_QUICK_
LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WEBKIT_LIB -DQT_QML_LIB -DQT_WIDG
ETS_LIB -DQT_SENSORS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL
_ES_2 -DQT_OPENGL_ES_2_ANGLE -I. -I'../../../../../../../../Qt/5.1.0/msvc2010/in

make[1]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit
-1.0.0/src'
make -f Makefile.webkit_server.Release
make[2]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit
-1.0.0/src'
g++ -x c++-header -c -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -
fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_QUICK_
LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WEBKIT_LIB -DQT_QML_LIB -DQT_WIDG
ETS_LIB -DQT_SENSORS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL
_ES_2 -DQT_OPENGL_ES_2_ANGLE -I. -I'../../../../../../../../Qt/5.1.0/msvc2010/in
clude' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/QtWebKitWidgets' -I'
../../../../../../../../Qt/5.1.0/msvc2010/include/QtQuick' -I'../../../../../../
../../Qt/5.1.0/msvc2010/include/QtOpenGL' -I'../../../../../../../../Qt/5.1.0/ms
vc2010/include/QtPrintSupport' -I'../../../../../../../../Qt/5.1.0/msvc2010/incl
ude/QtWebKit' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/QtQml' -I'../
../../../../../../../Qt/5.1.0/msvc2010/include/QtWidgets' -I'../../../../../../.
./../Qt/5.1.0/msvc2010/include/QtSensors' -I'../../../../../../../../Qt/5.1.0/ms
vc2010/include/QtNetwork' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/Q
tGui' -I'../../../../../../../../Qt/5.1.0/msvc2010/include/QtANGLE' -I'../../../
../../../../../Qt/5.1.0/msvc2010/include/QtCore' -I'release' -I'../../../../../.
./../../Qt/5.1.0/msvc2010/mkspecs/win32-g++' -o release/stable.h.gch/c++ stable.
h
cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport
"
make[2]: *** [release/stable.h.gch/c++] Error 1
make[2]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-
1.0.0/src'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-
1.0.0/src'
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2

有什么建议么?

4

1 回答 1

1

尝试验证您的 PATH 变量。一定有像 C:\Qt\$version$\bin 这样的东西。

于 2013-07-11T07:40:45.990 回答