安装平台:Mint 13 64 bit, Ubuntu 12.04同样适用,其他Linux distributions 根据情况做相应修改
CUDA 的安装
1. 从NVIDIA官网下载驱动
Toolkit(选Ubuntu 11.04 64bit),Driver, SDK
2. 安装其他依赖的库文件
sudo apt-get install g++ build-essential
sudo apt-get install freeglut3-dev libx1-dev libxmu-dev libxi-dev libgl1-mesa-glx libgl1-mesa-dev
sudo apt-get install libopencv-dev
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get install Python-dev python-numpy
sudo apt-get install libtbb-dev
sudo apt-get install libqt4-dev libgtk2.0-dev
3. 安装显卡驱动
需要先关闭x window, Mint 13 的方法,其他的步骤在此就不写了,网上有很多linux安装显卡驱动的教程
1 sudo killall mdm
4. 安装tookit 和 SDK
都是.sh 文件,直接用sh命令默认位置安装即可
然后添加环境变量
在 .bashrc 文件中添加下面的语句
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH
export CUDA_ROOT=/usr/local/cuda/bin
安装完SDK(NVIDIA_GPU_Computing_SDK)后,默认是安装在用户名字的目录下
进入NVIDIA_GPU_Computing_SDK文件夹
然后输入make命令
sudo make
会看到如下错误
(rendercheck_gl. cpp.o): In function `CheckBackBuffer::checkStatus(char const*, int, bool)': rendercheck_gl.cpp:(.text+0xfbb): undefined reference to `gluErrorString'