I downloaded and run the following:
sudo sh cudatoolkit_3.1_linux_32_ubuntu9.10.run
install it to /usr/local/cuda
install: sh gpucomputingsdk_3.1_linux.run
to ~/NVIDIA_GPU_Computing_SDK
setting:
sudo gedit ~/.bashrc
add
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
As CUDA is complied by GCC 4.3, so I downloaded :
gcc-3.4-base_3.4.6-6ubuntu3_i386.deb、
gcc-3.4_3.4.6-6ubuntu3_i386.deb、
cpp-3.4_3.4.6-6ubuntu3_i386.deb、
g++-3.4_3.4.6-6ubuntu3_i386.deb、
libstdc++6-dev_3.4.6-6ubuntu3_i386.deb
and installed them.
Then:
sudo apt-get install g++-4.3 gcc-4.3
As multiple versions of Gcc are needed:
sudo update-alternatives --install /usr/bin/gcc gcc
/usr/bin/gcc-4.4 44 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4 --slave
/usr/bin/gcov gcov /usr/bin/gcov-4.4
sudo update-alternatives
--install /usr/bin/gcc gcc /usr/bin/gcc-4.3 43 --slave /usr/bin/g++ g++
/usr/bin/g++-4.3 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.3
After that:
sudo update-alternatives --display gcc
For changing version of Gcc:
sudo update-alternatives --config gcc
change the version to 4.3
没有评论:
发表评论