有人在Ubuntu 13.10 64位上成功安装了CUDA 5.5吗?

我尝试按照Nvidia网站上的步骤安装CUDA 5.5,使用Ubuntu 12.10的deb文件(我可以在Nvidia网站上找到的最新版本),但安装程序无法启动,告诉我存在一些依赖性问题:

The following packages have unmet dependencies. cuda : Depends: cuda-5-5 (= 5.5-22) but it is not going to be installed. E: Unable to correct problems, you have held broken packages. 

我已经在Ubuntu 13.10 64位上成功安装了CUDA-5.5.22。

 $ uname -a Linux bagchi62 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:04:55 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 

我的GPU是GeForce GTX 650Ti。 以下是我安装的步骤:

步骤1.清除现有的NVIDIA驱动程序安装。 我必须为CUDA-5.5安装最新的NVIDIA驱动程序(331.20)才能工作。 [我后来发现你需要至少v319.37用于CUDA-5.5.22–支持Ubuntu 12.10的工具包]

 sudo apt-get purge nvidia* 

步骤2.从这里下载最新的NVIDIA驱动程序: http : //www.nvidia.com/Download/index.aspx ,以及来自此处的CUDA工具包: https : //developer.nvidia.com/cuda-downloads [我下载64位Ubuntu 12.10的.run文件]

步骤3.在/etc/modprobe.d为现有video驱动程序创建黑名单。 我创建了一个名为/etc/modprobe.d/blacklist-file-drivers.conf的文件,其中包含以下内容:

 blacklist nouveau blacklist lbm-nouveau blacklist amd76x_edac blacklist vga16fb blacklist rivatv blacklist rivafb blacklist nvidiafb blacklist nvidia-173 blacklist nvidia-96 blacklist nvidia-current blacklist nvidia-173-updates blacklist nvidia-96-updates alias nvidia nvidia_current_updates alias nouveau off alias lbm-nouveau off 

步骤4.安装依赖项。 [注意:CUDA-5.5.22需要gcc-v4.7.2或更低版本才能进行编译。 如果安装gcc-4.7 ,则会从存储库中提取v4.7.3,并且无法安装该工具包。 因此,我使用gcc-4.6 ]

 sudo apt-get install freeglut3 freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev gcc g++ gcc-4.6 g++-4.6 linux-headers-generic linux-source sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so 

步骤5.配置gcc替代方案。 你需要最新的NVIDIA驱动程序gcc和gcc-4.6 for CUDA工具包。 [我有最新的gcc-4.8。 你必须相应改变]

 sudo update-alternatives --remove-all gcc sudo update-alternatives --config gcc sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 

步骤6.完成先决条件。 重新启动并放入文本控制台( Ctrl+Alt+F1 )。 杀死你的显示管理员。 对于未经调整的Ubuntu 13.10,它是lightdm

 sudo service lightdm stop 

步骤7.安装NVIDIA驱动程序。 导航到下载目录,然后选择最新的gcc。 [注意:请勿复制粘贴以下代码。 相应地更改驱动程序文件的名称]

 sudo update-alternatives --config gcc #choose 4.8 sudo chmod +x NVIDIA-Linux-x86_64-331.20.run sudo ./NVIDIA-Linux-x86_64-331.20.run 

按照文字说明操作。 最初,它会发出有关不受支持的分发的警告。 忽略并继续。

步骤8.安装CUDA工具包。 [注意:请勿复制粘贴以下代码。 相应地更改工具包文件的名称]

 sudo update-alternatives --config gcc #choose 4.6 sudo chmod +x cuda_5.5.22_linux_64.run sudo ./cuda_5.5.22_linux_64.run 

按照文字说明。 不要安装工具包附带的CUDA驱动程序。

步骤9.将二进制文件和lib文件添加到路径中。 重启。

第10步。完成! 您现在可以make示例文件。 享受你的CUDA。

由Aaron Haviland先生提供:

 sudo apt-add-repository ppa:aaron-haviland/cuda-5.5 sudo apt-get install nvidia-cuda-toolkit 

如果有人想为ubuntu安装(当前)最新的NVIDIA驱动程序( 注意 :这不是 CUDA 5.5的依赖),这是一个简单的方法……

感谢“xorg crack pushers团队” :

 sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-331 

我的UBUNTU 13.10 64位系统( uname -a ):

 Linux gpia 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 

我安装CUDA Toolkit 5.5的方式:

1 – 在系统设置 – >软件和更新 – >其他驱动器中 ,选择:

SELECT:使用来自nvidia-319-updates (专有)的NVIDIA二进制Xorg驱动程序,内核模块和VDPAU库

这给了我NVIDIA驱动程序版本319.60 (它需要> = 319.37)。

2 – 安装gcc-4.6:

 sudo apt-get install gcc-4.6 

3 – 使用update-alternatives来处理gcc版本(如banskt所述 ):

 sudo update-alternatives --remove-all gcc sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100 sudo update-alternatives --config gcc 

并选择gcc-4.6

4 – 安装一些sutff以避免丢失CUDA样本中的库( libGLU.solibX11.solibXi.solibXmu.so ):

 sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa-dev 

5 – 安装以前从NVIDIA站点下载的CUDA Toolkit(RUN版本12.10 64位: developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run

 sudo sh cuda_5.5.22_linux_64.run 

答案: accepty (不支持), n (NVIDIA驱动程序), y (安装工具包), 输入 (默认位置), y (样本), 输入 (默认位置)

6 – 使用update-alternatives,返回gcc-4.8

 sudo update-alternatives --config gcc 

7 – 将CUDA二进制文件和lib路径添加到PATH和LD_LIBRARY_PATH环境变量:

路径:=======================================

 cd /etc/profile.d sudo vi cuda-5.5_bin.sh 

#inside文件:

 export PATH=$PATH:/usr/local/cuda-5.5/bin 

=============================================

LD_LIBRARY_PATH:============================

 cd /etc/ld.so.conf.d sudo vi cuda-5.5.conf 

#inside文件:

 /usr/local/cuda-5.5/lib /usr/local/cuda-5.5/lib64 

=============================================

8 – 注销您的系统并再次登录。 使用nvcc --version测试或编译并运行以下简单示例代码: first.cu , sumvec.cu和nvcc filename.cu -o filename.exec

有一个很好的CUDA时间:-D

我不知道你是否已经开始工作了,但是你有没有尝试过这里的指南? http://installion.co.uk/ubuntu/saucy/multiverse/n/nvidia-cuda-toolkit/install.html它对我有用

nustshell是,确保你启用了多元宇宙回购

 sudo apt-get install nvidia-cuda-toolkit 

干杯!

我在cuda安装中遇到了一些问题。 解决对我有用的错误的最好/更简单的方法是使用sudo aptitude install cuda而不是“sudo apt-get install cuda”。

apt-get不会处理错误, aptitude建议一种解决错误的方法,一切正常!

1)安装64位Ubuntu 12.04.3

2)更新开放终端:sudo apt-get update && sudo apt-get upgrade sudo shutdown -r now #reboot machine

3)安装编译工具,mpi,nvidia-331驱动程序,gcc / g ++ 4.6(支持,而不是gcc / g ++ 4.8或4.7.3)并设置为默认值。 此外,安装CUDA Toolkit样本编译所需的其他库,并将相应的符号链接指向CUDA Toolkit安装程序将找到它们的位置:

 sudo add-apt-repository ppa:xorg-edgers/ppa # adds repository that has latest NVIDIA drivers for 12.04.3 sudo apt-get update # updates package lists sudo apt-get install build-essential libcr-dev mpich2 mpich2-doc gcc-4.6 g++-4.6 nvidia-331 # build tools, compilers, gcc, nvidia sudo apt-get install libX11-dev libglu1-mesa libXi-dev libXmu-dev freeglut3-dev # libraries needed for compiling CUDA samples sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 sudo ln -s /usr/lib/x86_64-linux-gnu/libXi.so /usr/lib/libXi.so sudo ln -s /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/libGLU.so sudo ln -s /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/libX11.so sudo ln -s /usr/lib/x86_64-linux-gnu/libXmu.so /usr/lib/libXmu.so sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so sudo shutdown -r now # reboot machine 

4)下载并安装适用于Ubuntu 12.10(RUN)的CUDA 5.5 Toolkit 64位:在此处下载: https : //developer.nvidia.com/cuda-downloads

 install -- open terminal in directory where downloaded: chmod +x cuda_5.5.22_linux_64.run # This marks archive as an executable, archive name might be different sudo ./cuda_5.5.22_linux_64.run # step through license agreement, then type: accept Confirm you are installing on unsupported configuration -- type: y Installer will ask to install NVIDIA driver -- type: n Installer will ask to install the CUDA 5.5 Toolkit -- type: y Installer will ask toolkit location -- default is okay, hit Enter key to select default Installer will ask to install CUDA 5.5 Samples -- type: y Installer will ask samples location -- this can be changed, or left to default, I chose /opt/cuda_samples and later chown'ed that directory so that all could read/write to it Installer should complete, saying: =========== = Summary = =========== Driver: Not Selected Toolkit: Installed in /usr/local/cuda-5.5 Samples: Installed in /opt/cuda_samples Next: gedit ~/.bashrc & and place the following lines in the file: export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib:/usr/lib/nvidia-331:$LD_LIBRARY_PATH Also add a variable in .bashrc called CUDA_SAMPLES pointing to the directory where the CUDA samples were installed from above... ie: export CUDA_SAMPLES=/home/username/NVIDIA_CUDA-5.5_Samples Lastly, to compile all the CUDA Toolkit sources: # needed to compile samples that depend on GL cp /usr/local/cuda-5.5/extras/CUPTI/include/GL/glu.h ${CUDA_SAMPLES}/common/inc/GL/ cp /usr/local/cuda-5.5/extras/CUPTI/include/GL/gl.h ${CUDA_SAMPLES}/common/inc/GL/ One other thing, need to make a link to /usr/lib/nvidia-current to the driver files installed by the nvidia-331 driver, as this is the location where CUDA looks for libraries in Ubuntu. Do this via: sudo ln -s /usr/lib/nvidia-331 /usr/lib/nvidia-current Finally, from a terminal in the directory that was chosen to install the samples type: make All the samples should compile successfully. For platforms with Optimus (laptops) refer to: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html or look at http://bumblebee-project.org/ 

资料来源: http : //pastebin.com/fDpqvSi5

由Aaron Haviland先生提供:

 sudo apt-add-repository ppa:aaron-haviland/cuda-5.5 sudo apt-get install nvidia-cuda-toolkit 

感谢“xorg crack pushers团队”:

 sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-331 

所有我需要知道的(对于linux mint 17.1)这两个都节省了很多时间。