Centos6.4 安装QtCreator

一.下载安装包

32位下载地址:   http://download.qt-project.org/official_releases/qt/5.4/5.4.0/qt-opensource-linux-x86-android-5.4.0.run

64位下载地址:   http://download.qt-project.org/official_releases/qt/5.4/5.4.0/qt-opensource-linux-x64-android-5.4.0.run

二.遇到的问题

1、安装过程中弹出了一个对话框显示
Error during installation process (qt.54.gcc_64):
Execution failed(Unexpected exit code: 1): “/opt/Qt5.4.0//Tools/QtCreator/bin/sdktool addQt –id qt.54.gcc_64 –name Qt %{Qt:Version} GCC 64bit –type Qt4ProjectManager.QtVersion.Desktop –qmake /opt/Qt5.4.0/5.4/gcc_64/bin/qmake”
然后在命令行中会出现
Warning:…………………………………….、usr/lib64/version’GLIBCXX_3.4.14’not found……………………………
之类的说明缺少这个看是lib文件少还是lib64少,到http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/寻找,如果lib少就下载32位,lib64少就下载64位的

下载后解压

ar -x libstdc++6_4.7.2-5_amd64.deb
tar -zxvf data.tar.gz

然后就会出现usr文件夹,进入usr/lib/X86_64-linux-gnu目录,将libstdc++.so.6.0.17文件复制到 /usr/lib64 文件夹下面,然后建立软链接即可

ln -sf libstdc++.so.6.0.17 libstdc++.so.6

2.在qt中新建工程然后build的时候报错了,问题为cannot find -IGL ,上网搜了一下是因为没有安装OpenGL ,直接yum安装即可

yum install mesa*
yum install *glut*

3.安装完成后启动,虽然能够打开qt,但是会有报错:

Gtk-WARNING **: Attempt to load unknown IM context type 'gtk-im-context-none'
解决方法: 

删掉某一个插件:"/Opt/Qt5.3.2/Tools/QtCreator/bin/plugins/platformthemes/libqgtk2.so"

posted @ 2016-11-20 19:08  水火379  阅读(1471)  评论(0)    收藏  举报