Can't run SDK : CUDA 2.1 on Ubuntu 8.04.2 64bit

Hello everyone,

Thanks for the help of vincefn. vincefn not only tells me how to solve the problem, but also tells me the method to help me solve another problems.

I write down my whole progress, wish it will help someone like me who is totally a newbie for Linux and want to use CUDA.

Some operations are only for the Ubuntu 8.04.2 64bit.

I am a newbie for Linux. I used to run CUDA on window XP for about one year. Now I want to use more memory, so I choose to move to Linux 64bit system.

  1. Install the Ubuntu 8.04 64bit. This is very simple, I believe nobody can do wrong.

  2. Install the build essential, these files maybe used for you compile the kernel of nvidia driver.

[codebox]sudo apt-get update

sudo apt-get install build-essential

sudo apt-get install build-essential libglut3-dev[/codebox]

  1. Use root to install nvidia driver 180.22 for this system.
  1. Ctrl+Alt+F1 switch to the terminal mode

  2. stop the X window

[codebox]sudo /etc/init.d/gdm stop[/codebox]

  1. modify the file /etc/default/linux-restricted-modules-common, otherwise you can only use the low resolution.

[codebox]sudo gedit /etc/default/linux-restricted-modules-common[/codebox]

change DISABLED_MODULES="" to DISABLED_MODULES=“nv”, save and quit.

  1. install the 32bit OpenGL lib.

[codebox]sudo apt-get install libc6-dev-i386[/codebox]

otherwise when you install the nvidia driver, it will notice you the following information:

Unable to perform the runtime configration check for library ‘libGLso.1’ ( ‘/usr/lib32/libGL.so.180.22’ ); assuming successful installation.

  1. install the nvidia driver. Of course, you need to download from the nvidia website

[codebox]sudo chmod +x NVIDIA-Linux-x86_64-180.22-pkg2.run

sudo ./ NVIDIA-Linux-x86_64-180.22-pkg2.run[/codebox]

  1. start X window. It maybe need to reboot. If you can see the nvidia logo before login in, all right.

[codebox]sudo /etc/init.d/gdm start[/codebox]

  1. Use root user to install the cuda tool kit.

[codebox]sudo ./cudatoolkit_2.1_linux64_ubuntu8.04.run

[/codebox]

  1. Add /usr/local/cuda/bin to PATH and /usr/local/cuda/lib to LD_LIBRARY_PATH in file ~/.bashrc

[codebox]echo "# CUDA stuff

PATH=$PATH:/usr/local/cuda/bin

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib

export PATH

export LD_LIBRARY_PATH" >> ~/.bashrc[/codebox]

  1. Install the cuda sdk. Don’t need to use root user.

[codebox]cuda-sdk-linux-2.10.1215.2015-3233425.run[/codebox]

  1. Build:

     - release    configuration by typing "make".
    
     - debug      configuration by typing "make dbg=1".
    
     - emurelease configuration by typing "make emu=1".
    
     - emudebug   configuration by typing "make emu=1 dbg=1".
    
  1. If /usr/bin/ld: cannot find -lXi when you make

[codebox]sudo apt-get install libxi-dev[/codebox]

  1. if /usr/bin/ld: cannot find -lXmu when you make

[codebox] sudo apt-get install libxmu-dev[/codebox]

  1. just as the suggestion of vincefn

This all that I encouraged before I successfully run all the SDK projects. Good luck.

[indent]/usr/bin/ld: cannot find -lXi[/indent]
you should install ‘libxi-dev’ (I’m working with jaunty - 9.04, I assume the name was the same in 8.04).

Note: ‘apt-file search libXi’ would have told you were the missing file could have come from - you need to install apt-file first.

And you may want to install CUDA 2.2 directly since it’s now available.

Thank you very much. I finally run the CUDA on Linux.

Thanks OP!!! I eventually made the “make” run correctly! :thumbup: