NeoKylin(中标麒麟军用版) Desktop 5.0_X86-64 PyQt5 代码移植和编译环境搭建

1、修改源文件

这里可以将源文件修改为fedora21的163的源(换与不换见仁见智,若是自带的源里面没有可以换,但是建议下载源码编译,因为换为fc21的源会给你带来很大困扰,运气好的话不会)。

wget http://mirrors.163.com/.help/fedora-163.repo

wget http://mirrors.163.com/.help/fedora-updates-163.repo

2、更新缓存
yum makecache


3、PyQt5编译环境搭建

下载:

sip-4.18.tar.gz

PyQt5_gpl-5.7.zip

3.1、卸载系统自带sip

#rpm -e sip sip-devel

3.2、编译安装sip

# tar zvxf sip-4.18.tar.gz

# cd sip-4.18/

# python configure.py

# make && make install

3.3、编译Pyqt5.7

a. 

下载:qt-opensource-linux-x64-5.7.0.run

地址:http://download.qt.io/official_releases/qt/5.6/5.6.0/qt-opensource-linux-x64-5.7.0.run

安装:# chmod u+x qt-opensource-linux-x64-5.7.0.run

          # ./qt-opensource-linux-x64-5.7.0.run

b. 

下载

yum install qt5-qtquickcontrols -y

yum install qt5-qtdeclarative-devel -y (这一步是肯定装不上的,解决办法如下:)

下载:从fedora23的官网上下载两个包:

http://archives.fedoraproject.org/pub/archive/fedora/linux/updates/23/x86_64/q/

qt5-qtdeclarative-5.6.2-1.fc23.x86_64.rpm 

qt5-qtdeclarative-devel-5.6.2-1.fc23.x86_64.rpm

执行强制安装:

rpm -Uvh qt5-qtdeclarative-5.6.2-1.fc23.x86_64.rpm  qt5-qtdeclarative-devel-5.6.2-1.fc23.x86_64.rpm --nodeps

 c. 

编译安装:

# python configure.py --qmake=/opt/Qt5.7.0/5.7/gcc_64/bin/qmake

#  make  all -j4 && make install

最终在/usr/lib64/python2.7/site-packages/PyQt5/生成相应库文件

d.

yum install -y python-pip  python-configparser 

pip install requests

pip install proxmoxer

完毕!!!

猜你喜欢

转载自blog.csdn.net/wangyezi19930928/article/details/80361038