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.
-
Install the Ubuntu 8.04 64bit. This is very simple, I believe nobody can do wrong.
-
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]
- Use root to install nvidia driver 180.22 for this system.
-
Ctrl+Alt+F1 switch to the terminal mode
-
stop the X window
[codebox]sudo /etc/init.d/gdm stop[/codebox]
- 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.
- 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.
- 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]
- 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]
- Use root user to install the cuda tool kit.
[codebox]sudo ./cudatoolkit_2.1_linux64_ubuntu8.04.run
[/codebox]
- 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]
- Install the cuda sdk. Don’t need to use root user.
[codebox]cuda-sdk-linux-2.10.1215.2015-3233425.run[/codebox]
-
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".
- If /usr/bin/ld: cannot find -lXi when you make
[codebox]sudo apt-get install libxi-dev[/codebox]
- if /usr/bin/ld: cannot find -lXmu when you make
[codebox] sudo apt-get install libxmu-dev[/codebox]
- just as the suggestion of vincefn
This all that I encouraged before I successfully run all the SDK projects. Good luck.