我的ubuntu版本:10.04 LTS
Qt 5.1.1 for Linux 32-bit
下载后是.run文件,可以直接运行。一路下一步~
1.下载qt安装包:
http://qt-project.org/downloads
2.在命令行下运行/opt/Qt5.1.1/Tools/QtCreator/bin/qtcreator后提示
Failed to load platform plugin "xcb".Available platforms are:
linuxfb
offscreen
minimal
xcb
linuxfb
offscreen
minimal
xcb
输入以下命令解决
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
3.再次运行/opt/Qt5.1.1/Tools/QtCreator/bin/qtcreator,提示
核心载入失败:/opt/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/libCore.so:无法加载库/opt/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/libCore.so:(/usr/lib/libstdc++.so.6:version 'GLIBCXX_3.4.15' not found (required by /opt/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/../.././libQt5CLucene.so.5))
解决办法:
下载
libstdc++6-4.7-dbg_4.7.2-5_i386.deb
解压: ar -x libstdc++6_4.7.2-5_i386.deb && tar xvf data.tar.gz
把里面的libstdc++.so.6.0.17 拷贝到 /usr/lib/下,执行下面命令
cd /usr/lib
rm libstdc++.so.6
ln -s libstdc++.so.6.0.17 libstdc++.so.6
rm libstdc++.so.6
ln -s libstdc++.so.6.0.17 libstdc++.so.6
4.再次运行/opt/Qt5.1.1/Tools/QtCreator/bin/qtcreator,可正常打开qtcreator
ps:都弄好后,以后打开qtcreator就可以直接在应用程序->编程里打开了。