
你好,我很新,但已經成功安裝了 sip v4.16.9
(precise)cloud12321@localhost:~/Downloads/PyQt-gpl-5/PyQt-gpl-5.5$ sip -V 4.16.9
現在configure.py一切順利。我遇到的問題是每次我嘗試製作 PyQt5 時都會出現以下錯誤:
cd QtCore/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/cloud12321/Downloads/PyQt-gpl-5/PyQt-gpl-5.5/QtCore/QtCore.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/home/cloud12321/Downloads/PyQt-gpl-5/PyQt-gpl-5.5/QtCore'
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQSize.o sipQtCoreQSize.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQFile.o sipQtCoreQFile.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQAbstractAnimation.o sipQtCoreQAbstractAnimation.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQTextEncoder.o sipQtCoreQTextEncoder.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQSortFilterProxyModel.o sipQtCoreQSortFilterProxyModel.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQWriteLocker.o sipQtCoreQWriteLocker.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQList0100QPersistentModelIndex.o sipQtCoreQList0100QPersistentModelIndex.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQJsonParseError.o sipQtCoreQJsonParseError.cpp
/home/cloud12321/Downloads/PyQt-gpl-5/PyQt-gpl-5.5/QtCore/sipQtCoreQJsonParseError.cpp:147:49: error: 'DocumentTooLarge' is not a member of 'QJsonParseError'
make[1]: *** [sipQtCoreQJsonParseError.o] Error 1
make[1]: Leaving directory `/home/cloud12321/Downloads/PyQt-gpl-5/PyQt-gpl-5.5/QtCore'
make: *** [sub-QtCore-make_first-ordered] Error 2
有人可以指出我需要做什麼來修復這些錯誤的正確方向嗎?
答案1
答案2
我有同樣的錯誤。我安裝了 Qt 5.0,它通常隨 Ubuntu 12.04 一起提供。
為了解決這個問題,我安裝了 Qt 5.5(對於 Ubuntu 12.04,請參閱這條指令),然後使用 --qmake 標誌將對應的 qmake 路徑傳遞給 configure.py 腳本。