Debian安装Nvidia驱动

一、安装nvidia-detect工具

robin@B45:~$ sudo apt-get install nvidia-detect

二、利用nvidia-detect工具,查看nvidia显卡型号

robin@B45:~$ nvidia-detect

Detected NVIDIA GPUs:
0a:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT216 [GeForce GT 220] [10de:0a20] (rev a2)

Checking card: NVIDIA Corporation GT216 [GeForce GT 220] (rev a2)
Your card is only supported up to the 340 legacy drivers series.
It is recommended to install the
nvidia-legacy-340xx-driver

三、根据提示型号安装驱动

robin@B45:~$ sudo apt install nvidia-legacy-340xx-driver

四、重新启动系统,驱动安装完成。

Qtcreator修改构建目录,到工程目录下

  • 将工具–>选项–>构建和运行中Default build directory修改为./%{CurrentBuild:Name};
  • 把QtCreator关闭,把工程目录下后缀名为.pro.user的文件删掉;
  • 用QtCreator打开工程,会提示你创建构建目录,此时提示的就是你修改后的Default build directory中填写的目录;
  • 其中.pro.user文件记录了编译器、构建工具链、构建目录、版本…..等工程编译相关信息,想要更换项目的编译环境,得删除这个文件,由QtCreator自动重新创建。