在Angstrom上安装Qt和PySide

时间:2014-03-03 11:00:32

标签: python-2.7 qt4 pyside beagleboneblack angstrom-linux

我尝试在Qt中安装PySide进行接口开发。我让它在我的Arch盒子上工作,但经过几次尝试在Ang BeagleBone Black rev. A5上运行的Angstrom上安装它

使用各种方法进行安装,例如:

easy_install pyside
pip install pyside 

并从源代码构建它。

每次我尝试安装时都会收到相同的输出

-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Warning at /usr/share/cmake-2.8/Modules/FindQt4.cmake:591 (    MESSAGE):
  /usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib" but QtCore     could not
  be found there.  Qt is NOT installed correctly for the target build
  environment.
Call Stack (most recent call first):
  CMakeLists.txt:9 (find_package)


-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Could NOT find Qt4 (missing:  QT_INCLUDE_DIR QT_LIBRARY_DIR     QT_QTCORE_LIBRARY) (found suitable version "4.8.1", required is "4.5.    0")
-- Found PythonLibs: /usr/lib/libpython2.7.so (found suitable     version "2.7.3", required is "2.6") 
-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES     LIBXML2_INCLUDE_DIR) (Required is at least version "2.6.32")
-- Could NOT find LibXslt (missing:  LIBXSLT_LIBRARIES     LIBXSLT_INCLUDE_DIR) (Required is at least version "1.1.19")
Qt QTGUI library not found.
Qt QTXML library not found.
Qt QTCORE library not found.
-- sphinx-build - not found! doc target disabled
CMake Warning at CMakeLists.txt:127 (message):
  Some dependencies were not found, shiboken generator compilation     disabled!


-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/easy_install-p37FM6/    PySide-1.2.1/pyside_build/py2.7-qt4.8.1-32bit-release/shiboken
[  2%] Generating qrc_generator.cxx
Scanning dependencies of target apiextractor
[  4%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/    apiextractor.cpp.o
In file included from /tmp/easy_install-p37FM6/PySide-1.2.1/sources/    shiboken/ApiExtractor/abstractmetalang.h:27:0,
                 from /tmp/easy_install-p37FM6/PySide-1.2.1/sources/shiboken/ApiExtractor/apiextractor.h:28,
                 from /tmp/easy_install-p37FM6/PySide-1.2.1/sources/shiboken/ApiExtractor/apiextractor.cpp:24:
/tmp/easy_install-p37FM6/PySide-1.2.1/sources/shiboken/ApiExtractor/    typesystem.h:27:24: fatal error: QtCore/QHash: No such file or     directory
compilation terminated.
make[2]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.    cpp.o] Error 1
make[1]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/all] Error 2
make: *** [all] Error 2
error: Setup script exited with error: Error compiling shiboken

可以看出,找到Qt4很困难,我用它安装了

 opkg install qt4-embedded
 opkg install qt4-tools

1 个答案:

答案 0 :(得分:2)

所以我找到了问题的解决方案。

清除Qt并使用以下方法重新安装可以解决问题:

 opkg update #always a good idea
 opkg install qt4-x11-free-dev 

此外,还必须安装以下内容

 opkg install libxslt-dev
 opkg install libqtxml-dev
 opkg install libqtcore-dev 
 opkg install libqtgui-dev

最后:

 opkg install python-pip python-setuptools python-smbus
 pip install pyside

现在我们可以开始编程了。