1
votes

I have problems with install capybara-webkit

my qmake is QMake version 2.01a Using Qt version 4.8.4 in /usr/lib/x86_64-linux-gnu

qtchooser -list-versions returns default qt4 qt5-x86_64-linux-gnu 5 qt5

I don't know how to left only qt4, maybe this is reason of those errors:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/adam/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb 
cd src/ && /usr/bin/qmake /home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src/webkit_server.pro -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile.webkit_server
cd src/ && make -f Makefile.webkit_server 
make[1]: Wejście do katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
g++ -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -x c++-header -c stable.h -o build/webkit_server.gch/c++
stable.h:23:23: fatal error: QWebElement: Nie ma takiego pliku ani katalogu
 #include <QWebElement>
                       ^
compilation terminated.
make[1]: *** [build/webkit_server.gch/c++] Błąd 1
make[1]: Opuszczenie katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Błąd 2
Command 'make' failed

make "DESTDIR=" clean
cd src/ && make -f Makefile.webkit_server clean
make[1]: Wejście do katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
rm -f build/moc_GoForward.cpp build/moc_GoBack.cpp build/moc_WindowMaximize.cpp build/moc_WindowSize.cpp build/moc_WindowCommand.cpp build/moc_WindowOpen.cpp build/moc_WindowClose.cpp build/moc_Version.cpp build/moc_EnableLogging.cpp build/moc_Authenticate.cpp build/moc_SetConfirmAction.cpp build/moc_SetPromptAction.cpp build/moc_SetPromptText.cpp build/moc_ClearPromptText.cpp build/moc_JavascriptAlertMessages.cpp build/moc_JavascriptConfirmMessages.cpp build/moc_JavascriptPromptMessages.cpp build/moc_IgnoreSslErrors.cpp build/moc_WindowResize.cpp build/moc_CurrentUrl.cpp build/moc_ConsoleMessages.cpp build/moc_WebPage.cpp build/moc_Server.cpp build/moc_Connection.cpp build/moc_Command.cpp build/moc_SocketCommand.cpp build/moc_Visit.cpp build/moc_Reset.cpp build/moc_Node.cpp build/moc_JavascriptInvocation.cpp build/moc_Evaluate.cpp build/moc_Execute.cpp build/moc_FrameFocus.cpp build/moc_Response.cpp build/moc_NetworkAccessManager.cpp build/moc_NetworkCookieJar.cpp build/moc_Header.cpp build/moc_Render.cpp build/moc_Body.cpp build/moc_Status.cpp build/moc_Headers.cpp build/moc_UnsupportedContentHandler.cpp build/moc_SetCookie.cpp build/moc_ClearCookies.cpp build/moc_GetCookies.cpp build/moc_CommandParser.cpp build/moc_CommandFactory.cpp build/moc_SetProxy.cpp build/moc_NullCommand.cpp build/moc_PageLoadingCommand.cpp build/moc_SetSkipImageLoading.cpp build/moc_WebPageManager.cpp build/moc_WindowFocus.cpp build/moc_GetWindowHandles.cpp build/moc_GetWindowHandle.cpp build/moc_GetTimeout.cpp build/moc_SetTimeout.cpp build/moc_TimeoutCommand.cpp build/moc_SetUrlBlacklist.cpp build/moc_NoOpReply.cpp build/moc_JsonSerializer.cpp build/moc_ErrorMessage.cpp build/moc_Title.cpp build/moc_FindCss.cpp build/moc_JavascriptCommand.cpp build/moc_FindXpath.cpp build/moc_NetworkReplyProxy.cpp build/moc_StdinNotifier.cpp
rm -f qrc_webkit_server.cpp
rm -f build/GoForward.o build/GoBack.o build/WindowMaximize.o build/WindowSize.o build/WindowCommand.o build/WindowOpen.o build/WindowClose.o build/Version.o build/EnableLogging.o build/Authenticate.o build/SetConfirmAction.o build/SetPromptAction.o build/SetPromptText.o build/ClearPromptText.o build/JavascriptAlertMessages.o build/JavascriptConfirmMessages.o build/JavascriptPromptMessages.o build/IgnoreSslErrors.o build/WindowResize.o build/CurrentUrl.o build/ConsoleMessages.o build/main.o build/WebPage.o build/Server.o build/Connection.o build/Command.o build/SocketCommand.o build/Visit.o build/Reset.o build/Node.o build/JavascriptInvocation.o build/Evaluate.o build/Execute.o build/FrameFocus.o build/Response.o build/NetworkAccessManager.o build/NetworkCookieJar.o build/Header.o build/Render.o build/body.o build/Status.o build/Headers.o build/UnsupportedContentHandler.o build/SetCookie.o build/ClearCookies.o build/GetCookies.o build/CommandParser.o build/CommandFactory.o build/SetProxy.o build/NullCommand.o build/PageLoadingCommand.o build/SetTimeout.o build/GetTimeout.o build/SetSkipImageLoading.o build/WebPageManager.o build/WindowFocus.o build/GetWindowHandles.o build/GetWindowHandle.o build/TimeoutCommand.o build/SetUrlBlacklist.o build/NoOpReply.o build/JsonSerializer.o build/InvocationResult.o build/ErrorMessage.o build/Title.o build/FindCss.o build/JavascriptCommand.o build/FindXpath.o build/NetworkReplyProxy.o build/IgnoreDebugOutput.o build/StdinNotifier.o build/moc_GoForward.o build/moc_GoBack.o build/moc_WindowMaximize.o build/moc_WindowSize.o build/moc_WindowCommand.o build/moc_WindowOpen.o build/moc_WindowClose.o build/moc_Version.o build/moc_EnableLogging.o build/moc_Authenticate.o build/moc_SetConfirmAction.o build/moc_SetPromptAction.o build/moc_SetPromptText.o build/moc_ClearPromptText.o build/moc_JavascriptAlertMessages.o build/moc_JavascriptConfirmMessages.o build/moc_JavascriptPromptMessages.o build/moc_IgnoreSslErrors.o build/moc_WindowResize.o build/moc_CurrentUrl.o build/moc_ConsoleMessages.o build/moc_WebPage.o build/moc_Server.o build/moc_Connection.o build/moc_Command.o build/moc_SocketCommand.o build/moc_Visit.o build/moc_Reset.o build/moc_Node.o build/moc_JavascriptInvocation.o build/moc_Evaluate.o build/moc_Execute.o build/moc_FrameFocus.o build/moc_Response.o build/moc_NetworkAccessManager.o build/moc_NetworkCookieJar.o build/moc_Header.o build/moc_Render.o build/moc_Body.o build/moc_Status.o build/moc_Headers.o build/moc_UnsupportedContentHandler.o build/moc_SetCookie.o build/moc_ClearCookies.o build/moc_GetCookies.o build/moc_CommandParser.o build/moc_CommandFactory.o build/moc_SetProxy.o build/moc_NullCommand.o build/moc_PageLoadingCommand.o build/moc_SetSkipImageLoading.o build/moc_WebPageManager.o build/moc_WindowFocus.o build/moc_GetWindowHandles.o build/moc_GetWindowHandle.o build/moc_GetTimeout.o build/moc_SetTimeout.o build/moc_TimeoutCommand.o build/moc_SetUrlBlacklist.o build/moc_NoOpReply.o build/moc_JsonSerializer.o build/moc_ErrorMessage.o build/moc_Title.o build/moc_FindCss.o build/moc_JavascriptCommand.o build/moc_FindXpath.o build/moc_NetworkReplyProxy.o build/moc_StdinNotifier.o build/qrc_webkit_server.o
rm -f build/webkit_server.gch/c build/webkit_server.gch/c++
rm -f *~ core *.core
make[1]: Opuszczenie katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'

make "DESTDIR="
cd src/ && make -f Makefile.webkit_server 
make[1]: Wejście do katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
g++ -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -x c++-header -c stable.h -o build/webkit_server.gch/c++
stable.h:23:23: fatal error: QWebElement: Nie ma takiego pliku ani katalogu
 #include <QWebElement>
                       ^
compilation terminated.
make[1]: *** [build/webkit_server.gch/c++] Błąd 1
make[1]: Opuszczenie katalogu `/home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Błąd 2

make failed, exit code 2

Gem files will remain installed in /home/adam/.rvm/gems/ruby-2.1.0/gems/capybara-webkit-1.2.0 for inspection.
Results logged to /home/adam/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/capybara-webkit-1.2.0/gem_make.out

How can I reapair it?

1
sudo apt-get install libqtwebkit-dev helped.Kubik92

1 Answers

1
votes

On CentOS 7

sudo yum -y install epel-release
sudo yum -y install qtwebkit-devel