http://www.linuxdiyf.com/linux/13046.html

Qt5.5已经发布了,前两天PyQt也很快推出了一个5.5的对应版本。试验了一下(花了个周末啊!),真是越来越好用了。Qt5.5在Ubuntu15.04上有一些重要的改进,在虚拟机里运行的窗口覆盖问题也终于没有了。因为要装好几个软件,挺花功夫的。这里给出个脚本,可以快速安装。

首先安装Qt5.5。

#在线安装用这个.
wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
chmod +x qt-unified-linux-x64-online.run
./qt-unified-linux-x64-online.run

#离线安装用这个.
wget http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0-2.run
chmod +x qt-opensource-linux-x64-5.5.0-2.run
./qt-opensource-linux-x64-5.5.0-2.run

然后,设置一下Qt的路径。

#Add Qt Path to /etc/profile.
sudo gedit /etc/profile
#add line:
export PATH=$PATH:/home/userXXX/Qt/Qt5.5/gcc_64/bin

一般新装的系统需要安装OpenGL的支持。

sudo apt-get install libgl1-mesa-dev

注意:目前的Qt5.5版本的开源版本中将“Open Source”标示为了“Builder Qt”,导致PyQt中判断错误,抛出许可不兼容的错误。将PyQt目录中的configure.py添加如下行(搜索Common checks,2590行处),重新编译即可。

# Common checks.
#change by openthings@163.com.
print("License:")
print(introspecting)
print(target_config.qt_licensee)
print(ltype)
target_config.qt_licensee = ‘Open Source‘
#end change.

下面是完整的脚本:

#!/bin/sh
#Author:openthings@163.com.

#Install Qt5.5.
#Get online installer.
#wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
#chmod +x qt-unified-linux-x64-online.run

#Get offline installer.
#wget http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0-2.run
#chmod +x qt-opensource-linux-x64-5.5.0-2.run

#Add Qt Path to /etc/profile.
#sudo gedit /etc/profile
#add line: export PATH=$PATH:/home/userXXX/Qt/Qt5.5/gcc_64/bin

echo "Build PyQt.==============================================="
if [ ! -d "pyqt" ]; then
mkdir pyqt
fi
cd pyqt

echo "Add OpenGL lib...========================================="
sudo apt-get install libgl1-mesa-dev

echo "Install SIP-4.16.9========================================"
if [ ! -f "sip-4.16.9.tar.gz" ]; then
wget http://www.riverbankcomputing.com/static/Downloads/sip4/sip-4.16.9.tar.gz
fi
if [ ! -d "sip-4.16.9" ]; then
tar -vxf sip-4.16.9.tar.gz
fi

cd sip-4.16.9
python3 configure.py
make
sudo make install
cd ..

echo "Install PyQt-5.5=========================================="
if [ ! -f "PyQt-gpl-5.5.tar.gz" ]; then
wget http://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt-gpl-5.5.tar.gz
fi
if [ ! -d "PyQt-gpl-5.5" ]; then
tar -vxf PyQt-gpl-5.5.tar.gz
fi

cd PyQt-gpl-5.5
cp ../../configure.py ./configure.py
python3 configure.py
make
sudo make install
cd ..

echo =========================================
echo QT5 and PyQT 5.5/SIP 4.16.9 Installed.
echo =========================================

Qt+Python已经开始成为很多系统级软件的标配了,Qt5.5的发布改掉了以前的很多小毛病,基本上可以放心地使用了。

linux 公社的网友出品的 Qt5.5 安装脚本,copy过来了的更多相关文章

  1. centos7 lvm合并分区脚本初探-linux性能测试 -centos7修改网卡名字-jdk环境安装脚本-关键字查询文件-批量添加用户

    1.#!/bin/bash lvmdiskscan | grep centos > /root/a.txt a=`sed -n '1p' /root/a.txt` b=`sed -n '2p' ...

  2. CentOS下配置多个Tomcat同时运行 本篇文章来源于 Linux公社网站(www.linuxidc.com)

    原文地址:http://blog.csdn.net/tjcyjd/article/details/46553361 版权声明:本文为博主原创文章,未经博主允许不得转载. 同一服务器部署多个tomcat ...

  3. linux公社的大了免费在线android资料

    2011年linux数据库的android在线分享 linux公社:开源公社             本文撰写:杨凯专属频道 2011年9月12日 21:39 <目录> Android 3 ...

  4. linux公社

    linux公社网址:http://www.linuxidc.com/ 资料下载地址:http://linux.linuxidc.com/

  5. linux公社大量免费的在线android资料

    2011年linux数据库的android在线分享 linux公社:开源公社             本文撰写:杨凯专属频道 下载如需密码,详见博客案例:点击我去查看密码 2011年9月12日 21: ...

  6. Linux14.04安装Mysql Linux公社

    今天在Ubuntu 14.04下安装MySQL,本来是去官网下载安装包来安装的,可是安装之后却不能用,估计是要配置吧,在网上搜了很多的资料,结果还是失败.所以只好在软件源中安装,这样就省去很多不必要的 ...

  7. Linux平台oracle 11g单实例 + ASM存储 安装部署 快速参考

    操作环境:Citrix虚拟化环境中申请一个Linux6.4主机(模板)目标:创建单机11g + ASM存储 数据库 1. 主机准备 2. 创建ORACLE 用户和组成员 3. 创建以下目录并赋予对应权 ...

  8. Linux程序包管理之yum及源代码安装

    第十六章.Linux程序包管理之yum及源代码安装 目录 yum介绍 yum配置文件 yum的repo配置文件中可用的变量 yum命令的使用 使用光盘作为本地yum仓库 如何创建yum仓库 编译安装的 ...

  9. Linux安装脚本需要交互之如何实现自动安装

    Linux中shell脚本运行时经常需要进行交互,比如安装软件的过程中对license声明的确认,需要输入yes,回车之类的确认信息.这个在自动化安装的时候就会是个问题. 通常对于这个问题比较灵活的解 ...

随机推荐

  1. win7 64 位 tomcat 定时重启脚本

    添加进任务计划即可 net stop "scm"                                           [停止服务] rd /s /q D:\tomc ...

  2. 一次线上http接口调用不通相关的解决过程

    2016-05-25 08:58:34 昨天线上小白系统因为调用外部http接口,超时不释放,导致页面反应很慢,时间一长,报502错误. 上网查了下,502错误是因为服务对于客户的请求没有得到及时的反 ...

  3. C++多线程3

    #include "stdafx.h" #include <windows.h> #include <process.h> int g_count; ; u ...

  4. C# WebBrowser控件使用教程与技巧收集

    常用的方法 Navigate(string urlString):浏览urlString表示的网址 Navigate(System.Uri url):浏览url表示的网址 Navigate(strin ...

  5. 10款html5开发工具,实用+好用

    利用HTML5工具不仅可以帮助设计师和开发者创建更具吸引力的网站,还能增加网站的可用性和可访问性.本文收集了10款HTML5开发工具让你在网页中搭建特效.动画.视频.音频等诸多功能,为你节省更多开发时 ...

  6. 我创建了一个网站,专门分享公众号的文章 https://asyons.com

    网址:https://asyons.com/,为做个网站,自娱自乐的自明星,但投资也挺大的了,注册了一家公司,公财私章,做账报税,阿里云服务器,全职开发.算上时间价值,按小时,投资过5万了.

  7. sql server数据库连接问题处理

    下面请一字一句地看,一遍就设置成功,比你设置几十遍失败,费时会少得多. 首先,在连接数据库之前必须保证SQL Server 2012是采用SQL Server身份验证方式而不是windows身份验证方 ...

  8. centos 6 安装 gitlib

    安装gitlab-----------1. 下载 gitlabcurl -O https://downloads-packages.s3.amazonaws.com/centos-6.5/gitlab ...

  9. Spark External Datasets

    Spark能够从任何支持Hadoop的存储源来创建RDD,包括本地的文件系统,HDFS,Cassandra,Hbase,Amazon S3等.Spark支持textFile.SequenceFiles ...

  10. 1Caesar加密

    Julius Caesar发明的较早的加密术,举个例子: 明文: meet me after the toga party 密文:   PHHW PH DIWHU WKH WRJD SDUWB 其实就 ...