qt 5.1.1 on CentOS 6.4
Overview
If you are trying to install Qt and Qwt [qwt.sourceforge.net] (Qt Widgets for Technical Applications) on CentOS, then the following instructions should be of good use. These steps were created, after many a trial and error, using Qt 5.1.1 and Qwt 6.1.0 on CentOS 6.4 ×86 64bit. These steps have proven to work on several CentOS machines and could also work on Fedora and Red Hat.
Feel free to use newer versions of the install packages, but just make sure to alter the version numbers in the steps as applicable. Also, most dependencies are covered in these instructions, but there may be others that you will have to find if something fails to build properly.
Installing Qt 5.1.1 on CentOS 6.4
1. Install Development Tools
- sudo yum groupinstall "Development Tools"
2. Install glibc-devel.i686 (the 32-bit version is required to build GCC)
- sudo yum install glibc-devel.i686
3. Download and install GCC [gcc.gnu.org] 4.8.1 or latest version. Instructions copied from here [gcc.gnu.org]
- tar xvjf gcc-4.8.1.tar.bz2
- cd gcc-4.8.1
- ./contrib/download_prerequisites
- cd ..
- mkdir objdir
- cd objdir
- $PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1
- make
- sudo make install
4. Copy new GCC libraries to /usr/lib64
- sudo mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.backup
- sudo cp -P /opt/gcc-4.8.1/lib64/libstdc++.so.6 /usr/lib64
- sudo cp /opt/gcc-4.8.1/lib64/libstdc++.so.6.0.18 /usr/lib64/
- sudo ldconfig -v
5. Download and install Qt [qt-project.org] 5.1.1 or latest version
- sudo ./qt-linux-opensource-5.1.1-x86_64-offline.run
6. Add Qt commands to PATH (e.g. qmake)
- Create qt5.sh file
- sudo gedit /etc/profile.d/qt5.sh
- Add the following lines to qt5.sh
- PATH=/opt/Qt5.1.1/5.1.1/gcc_64/bin:$PATH
- export PATH
- Save and close qt5.sh
- Run qt5.sh
- . /etc/profile.d/qt5.sh
- Verify that qmake is version 5.1.1
- which qmake
7. Edit Qt Creator desktop configuration file to allow all users to run
- sudo gedit /usr/share/applications/DigiaQtOpenSource-qtcreator.desktop
- Comment out or remove the line “Path=/root”
- Save and close DigiaQtOpenSource-qtcreator.desktop
Installing Qwt 6.1.0 on CentOS 6.4
1. Install mesa-libGLU-devel
- sudo yum install mesa-libGLU-devel
2. Download and install Qwt [qwt.sourceforge.net] 6.1.0 or latest version
- tar xvjf qwt-6.1.0.tar.bz2
- cd qwt-6.1.0
- Configure qwtconfig.pri
- gedit qwtconfig.pri
- Change QWT_INSTALL_PREFIX to “/opt/qwt-$$QWT_VERSION”
- Configure rest of qwtconfig.pri and comment/uncomment plugins as desired
- Save and close qwtconfig.pri
- Build and install Qwt
- qmake qwt.pro
- make
- sudo make install
3. Link Qwt plugin to Qt
- sudo ln -s /opt/qwt-6.1.0/plugins/designer/libqwt_designer_plugin.so /opt/Qt5.1.1/Tools/QtCreator/bin/plugins/designer/
4. Create qwt ld.so configuration file
- echo /opt/qwt-6.1.0/lib | sudo tee /etc/ld.so.conf.d/qwt.conf
- sudo ldconfig -v
5. Add the following lines to the .pro file of the Qt project in which you want to use Qwt plugins
- #QWT
- QWT_LOCATION = /opt/qwt-6.1.0
- INCLUDEPATH += $${QWT_LOCATION}/include/
- LIBS += -L$${QWT_LOCATION}/lib -lqwt
6. Done!
qt 5.1.1 on CentOS 6.4的更多相关文章
- Hadoop生态圈-离线方式部署Cloudera Manager5.15.1
Hadoop生态圈-离线方式部署Cloudera Manager5.15.1 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 到目前位置,Cloudera Manager和CDH最新 ...
- 几个比較好的IT站和开发库官网
几个比較好的IT站和开发库官网 1.IT技术.项目类站点 (1)首推CodeProject,一个国外的IT站点,官网地址为:http://www.codeproject.com,这个站点为程序开发人员 ...
- Linux基础命令-查看基本硬件信息
Linux基础命令-查看基本硬件信息 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看CPU信息 [root@node101.yinzhengjie.org.cn ~]# l ...
- 几个比较好的IT站和开发库官网
1.IT技术.项目类网站 (1)首推CodeProject,一个国外的IT网站,官网地址为:http://www.codeproject.com,这个网站为程序开发者提供了很好的代码示例以及讲解,不过 ...
- centos 下 Qt Creator 的安装使用
centos 下 Qt Creator 的安装使用 Qt 以其开源,免费,完全面向对象(很容易扩展),允许真正的组件编程以及可移植跨平台等诸多优势得到越来越多的开发人员的青睐.Qt Creator 是 ...
- 在CentOS下面编译WizNote Qt Project
编译环境 CentOS 64位 Desktop 版本:6.5 编译前的准备: CentOS的用户默认没有root权限,如果当前用户没有权限root,则可以在终端里面执行下面的命令: su root s ...
- CentOS下Qt窗口透明效果失效,成黑色背景的问题
一.问题 Linux系统下Qt窗口的透明效果成了黑色,但同样的代码在windows机子上有透明效果,主要是修改系统的配置,仅在centos6.3及其以上版本实验过.其他系统可以相应配置. 二.问题运行 ...
- Qt for Linux:环境搭建(CentOS 6.5 32位)——完全从零安装
正文开始前,我们假设,用户可以操作终端 拥有root权限,以下所有操作也均由root完成 可以上网 安装了CentOS 6.5 32位 注:红色部分,每个人可能都不一样 话不多说,列出本章大致流程 1 ...
- centos 下Qt安装 mysql驱动(亲测可行)
(前半部分没有试过,因为我的有mysql驱动,实在抱歉) 1.预防万一,先安装一下mysql-devel(一定要装!). 不安装的话后面编译会出现找不到-lmysqlclient的问题. 2. 开始编 ...
随机推荐
- struts2之动态方法调用(转)
转自:http://blog.csdn.net/longwentao/article/details/6940289 当我们访问一个Action时,默认是访问execute()方法,但当在一个Acti ...
- Oracle EBS-SQL (WIP-11):检查期间任务完工记录数.sql
select WE.WIP_ENTITY_NAME 任务名称, WDJ.class_code ...
- 为WPF项目创建单元测试
原文作者: 周银辉 来源: 博客园 原文地址:http://www.cnblogs.com/zhouyinhui/archive/2007/09/30/911522.html 可能你已发现一个问题, ...
- C#dll版本号默认生成规则
原文:C#dll版本号默认生成规则 1.版本号自动生成方法 只需把 AssemblyInfo.cs文件中的[assembly: AssemblyVersion("1.0.0.0") ...
- Android开发之发送邮件功能的实现(源代码分享)
Android开发中可能会碰到如何发送邮件的困扰,之前我也查了相关的文档,博友们也分享了不少的发送邮件的办法,总共有3种把,我仔细阅读了下,发现有的讲的太过复杂跟麻烦,不够清晰,我今天就来分享下我认为 ...
- 加入商品分类信息,考虑用户所处阶段的 图模型 推荐算法 Rws(random walk with stage)
场景: 一个新妈妈给刚出生的宝宝买用品,随着宝宝的长大,不同的阶段需要不同的物品. 这个场景中涉及到考虑用户所处阶段,给用户推荐物品的问题. 如果使用用户协同过滤,则需要根据购买记录,找到与用户处于同 ...
- 【POJ】1330 Nearest Common Ancestors ——最近公共祖先(LCA)
Nearest Common Ancestors Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18136 Accept ...
- Java学习-练习1
题目描述: 吸血鬼数字是指位数为偶数的数字,可以由一对数字相乘而得到, 而这对数字各包含乘积的一半位数的数字,其中最初的数字中可以 选取的数字可以任意排序,以两个0结尾的数字是不允许的,例如,下 面的 ...
- AndroidUI 布局动画-为布局添加动画
除了可以为视图添加动画以外,还可以为视图的布局添加动画: <RelativeLayout xmlns:android="http://schemas.android.com/apk/r ...
- css的绝对定位
假设绝对定位的元素的id为absoluteDiv. 当包含absoluteDiv的块中没有设置position:relative时, absoluteDiv会相对于浏览器(window.top)定位. ...