安装qtcreator。官网下载qt-creator-opensource-linux-x86_64-3.2.2.run,到/usr/local/src/目录。.run文件的安装很简单,只需要为该文件增加可执行属性,即可直接运行打开可视化安装界面。
安装步骤:
cd /usr/local/src/
chmod +x qt-creator-opensource-linux-x86_64-3.2.2.run
sudo ./qt-creator-opensource-linux-x86_64-3.2.2.run
打开了图形化安装向导界面,按向导步骤安装则可。
出现问题:
安装后打不开qtcreator. 从Dash里面点qtcreator的图标,任何反应都没有。进入安装后的bin目录,./qtcreator也打不开,但是提示一个错误:
Could not initialize GLX
Google了一会,说是nvidia drive和Graphic card兼容相关的问题。如果不加载欢迎页面,这样:
./qtcreator -noload Welcome
就可以打开,果然。但是看了特别不习惯,于是继续求解,...
解决方法:
第一步:
Enable the Universe and Multiverse repositories - you need to do this to allow the bumblebee and nvidia packages respectively to be installed.
1) sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
2) sudo gedit /etc/apt/sources.list
3) Multiverse is already turn on by default.
第二步:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
第三步:
Install Bumblebee using the default proprietary nvidia driver for 12.04 :
sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
第四步:
Reboot
详细参考:
https://wiki.ubuntu.com/Bumblebee