Installing Cuda on Ubuntu 11.10

Installing Cuda on Ubuntu 11.10

Written 2011-10-27by Timo Dickscheid, tagged as 3d,ubuntu

To install Cuda, I followed some hints on bottom ofthis thread, but also had to fix a few more issues.

  1. Download the current Cuda Toolkit for Ubuntu and the GPU Computing SDK, and save the .run files somewhere.

  2. Install and select gcc/g++ 4.4

    sudo apt-get install \
        gcc-4.4 g++-4.4 build-essential
    sudo update-alternatives \
        --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 \
        --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 
    sudo update-alternatives \
        --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 \
        --slave /usr/bin/g++ g++ /usr/bin/g++-4.4
    

    Check with

    sudo update-alternatives —config gcc
    gcc —version
    

    that you have now version 4.4.x of the compilers.

  3. Install the nvidia drivers

    sudo apt-get install \
        nvidia-current\
        nvidia-current-dev\
        nvidia-current-updates\
        nvidia-current-updates-dev
    
  4. As root, run the two .run files from nvidia (see 1.).

  5. For compiling the SDK examples, you also need to install

    sudo apt-get install freeglut3-dev libxi-dev
    

    and create the following links

    sudo ln -s /usr/lib/libXmu.so.6 /usr/lib/libXmu.so
    sudo ln -s /usr/lib/nvidia-173/libGL.so /usr/lib/libGL.so
    

    Then go to theNVIDIA_GPU_COMPUTING_SDK_...folder. In the fileC/common/common.mkchange the line

    LINKFLAGS +=
    

    to

    LINKFLAGS += -L/usr/lib/nvidia-current
    

    Then run make. This should compile everything, indicating that the CUDA stuff works.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值