我想安裝capybara-webkit(0.8.0),但是我得到下面的錯誤,任何機構可以幫助,我在Ubuntu 11.10。rails 3.1,安裝capybara-webkit,無法構建gem原生擴展,該怎麼辦?
Installing capybara-webkit (0.8.0) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/sam/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb /usr/bin/qmake /usr/bin/make cd src/ && /usr/bin/qmake
/home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0/src/webkit_server.pro -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile.webkit_server /usr/bin/make cd src/ && make -f Makefile.webkit_server make[1]: Entering directory
/home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0/src' g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -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 -I. -o RequestedUrl.o RequestedUrl.cpp make[1]: g++: Command not found make[1]: *** [RequestedUrl.o] Error 127 make[1]: Leaving directory
/home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0/src' make: * [sub-src-webkit_server-pro-make_default-ordered] Error 2make cd src/ && make -f Makefile.webkit_server make[1]: Entering directory
/home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0/src' g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -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 -I. -o RequestedUrl.o RequestedUrl.cpp make[1]: g++: Command not found make[1]: *** [RequestedUrl.o] Error 127 make[1]: Leaving directory
/home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0/src' make: * [sub-src-webkit_server-pro-make_default-ordered] Error 2Gem files will remain installed in /home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0 for inspection. Results logged to /home/sam/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0/./gem_make.out An error occured while installing capybara-webkit (0.8.0), and Bundler cannot continue. Make sure that
gem install capybara-webkit -v '0.8.0'
succeeds before bundling.
謝謝,請問我可以在哪裏安裝g ++?爲了RoR的緣故,我來自.NET世界的unix,我仍然需要學習新的東西,非常感謝您的幫助。 – simo
我發現他的線索,我認爲它接近解決方案: http://forums.opensuse.org/english/get-technical-help-here/applications/451945-bin-sh-g-command-not-在Ubuntu上found.html – simo
它看起來該軟件包被稱爲g ++。像apt-get install g ++' –