A)

A)

我的工作站有两个 GPU(Quadro K5200 和 Quadro K2200),安装了最新的 NVIDIA 驱动程序(版本:352.41)。cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.debCUDA 7.5 下载,我尝试安装它,但是结果如下:

root@P700-Bruce:/home/bruce/Downloads# sudo apt-get install cuda
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cuda : Depends: cuda-7-5 (= 7.5-18) but it is not going to be installed
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我已经尝试过解决办法:

  1. sudo apt-get remove nvidia-cuda-* # 删除旧的 nvidia-cuda 包
  2. 安装未满足的依赖项:

    root@P700-Bruce:/home/bruce/Downloads# apt-get install cuda-7-5
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     cuda-7-5 : Depends: cuda-toolkit-7-5 (= 7.5-18) but it is not going to be installed
                Depends: cuda-runtime-7-5 (= 7.5-18) but it is not going to be installed
     unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                            Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    
    root@P700-Bruce:/home/bruce/Downloads# apt-get install cuda-toolkit-7-5
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     cuda-toolkit-7-5 : Depends: cuda-core-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-command-line-tools-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-samples-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-documentation-7-5 (= 7.5-18) but it is not going to be installed
                        Depends: cuda-visual-tools-7-5 (= 7.5-18) but it is not going to be installed
     unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                            Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    
  3. 安装和使用资质

我的 Ubuntu14.04 操作系统刚刚安装,并进行了软件更新并安装了最新的 Nvidia 驱动程序。

你能帮忙吗?提前谢谢!

答案1

CUDA 的安装有点棘手。我按照以下步骤操作,效果不错。你可以参考这个关联还。

环境确认:

  1. lspci | grep -i nvidia (确认显示了NVIDIA的板子信息)

  2. uname -m (确保它是 x86_64)

  3. gcc --version (确保已安装)

安装 CUDA –

  1. 下载cuda_7.5.18_linux.run文件自https://developer.nvidia.com/cuda-downloads

  2. 运行以下命令:

    sudo apt-get install build-essential
    echo blacklist nouveau option nouveau modeset=0 |sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf 
    sudo update-initramfs -u
    
  3. 重启计算机

  4. 在登录屏幕上,按Ctrl++AltF1登录到您的用户。

  5. 进入 CUDA 驱动程序所在的目录,然后运行

    chmod a+x .
    sudo service lightdm stop
    sudo bash cuda-7.5.18_linux.run --no-opengl-libs
    
  6. 安装过程中:

    • 接受 EULA 条件
    • 同意安装 NVIDIA 驱动程序
    • 同意安装 CUDA Toolkit + Driver
    • 同意安装 CUDA 示例
    • 拒绝使用 Nvidia 重建任何 Xserver 配置
  7. 检查/dev/nvidia*文件是否存在。如果不存在,请执行以下操作

    sudo modprobe nvidia
    
  8. 设置环境路径变量

    export PATH=/usr/local/cuda-7.5/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
    
  9. 验证驱动程序版本

    cat /proc/driver/nvidia/version`
    
  10. 检查 CUDA 驱动程序版本

    nvcc –V
    
  11. 再次打开 lightdm

    sudo service lightdm start
    
  12. Ctrl++AltF7通过GUI登录系统

  13. NVIDIA_CUDA-7.5_Samples创建 CUDA 示例,通过终端进入文件夹,然后运行以下命令:

    make
    cd bin/x86_64/linux/release/
    ./deviceQuery
    ./bandwidthTest
    

    两个测试最终都会在终端输出“PASS”

  14. 重新启动系统

答案2

有两种方法可以安装合适的 CUDA 驱动程序(适用于 Optimus 以及混合主板上的其他内置图形芯片组)——这里描述的第一种方法是最简单的,第二种方法比较麻烦但也有效:

A)

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo reboot

B)

方法 B 的描述在这里,但已经很旧了(由用户 dschinn1001 解释) - 此方法 B 更为谦逊,可能有风险,但无害。:

如何在 Ubuntu13.04 中安装 Nvidia Driver GT 520 和 Cuda 5.0?

可供 Linux 下载的 Nvidia beta 驱动程序包在这里:

http://www.nvidia.de/object/cuda_1_1_beta.html

方法 A 更简单,但不清楚它如何与 xscreensaver 交互,方法 B 更老,但驱动程序包最近也更新了,方法 B 完成后,在安装了 xscreensaver 的情况下,它应该可以更好地与 xscreensaver 配合使用。(我在 13.10 上测试了方法 B,即使使用 xscreensaver 也运行良好。我认为这个线程的其余部分取决于硬件。)

此外,对于采用 Optimus 显卡芯片组的大黄蜂,也需要对大黄蜂进行以下调整:

如何在 14.04 中设置 nVidia Optimus/Bumblebee

答案3

听上去像lp 错误 1428972

用户 fennytansy 在中添加了一个解决方法评论#10

sudo apt-get install libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0

答案4

尝试卸载 nvidia 驱动程序,然后直接安装 cuda。在全新的 Ubuntu 14.04 上,我按照英伟达网站。除了验证兼容版本(gcc、内核)外,说明如下:

sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb 
sudo apt-get update
sudo apt-get install cuda 

令人高兴的是,正确的 nvidia 驱动程序已作为上述步骤的副产品安装。

相关内容