尝试在 Ubuntu 18.04 上安装 CUDA 9.2

     2023-04-15     151

关键词:

【中文标题】尝试在 Ubuntu 18.04 上安装 CUDA 9.2【英文标题】:Trying to install CUDA 9.2 on Ubuntu 18.04 【发布时间】:2019-01-18 05:49:27 【问题描述】:

我正在,遵循 this 网站:

我已经下载了 NVIDIA CUDA Toolkit(shell 脚本 cuda_9.2.88_396.26_linux),但是当我运行它时($sudo sh cuda_9.2.88_396.26_linux),我得到了:

Installing the NVIDIA display driver...
A system reboot is required to continue installation. Please reboot then run the installer again. 
An attmept has been made to disable Nouveau. 
If this message persists after reboot, please see the display driver log file at /var/log/nvidia-installer.log for more information.

所以,我重新启动并再次运行 shell 脚本 ($sudo sh cuda_9.2.88_396.26_linux),我得到了相同的消息。这就是 nvidia-installer.log 所说的:

 ERROR: The Nouveau kernel driver is currently in use by your system.  This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding.  Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf.  Please be sure you have rebooted your system since these files were written.  If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file.  Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
-> For some distributions, Nouveau can be disabled by adding a file in the modprobe configuration directory.  Would you like nvidia-installer to attempt to create this modprobe file for you? (Answer: Yes)
-> One or more modprobe configuration files to disable Nouveau have been written.  For some distributions, this may be sufficient to disable Nouveau; other distributions may require modification of the initial ramdisk.  Please reboot your system and attempt NVIDIA driver installation again.  Note if you later wish to reenable Nouveau, you will need to delete these files: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

我已经安装了我的 nvidia 驱动程序。

【问题讨论】:

也许你应该关注this。 【参考方案1】:

首先,我会遵循the official guide 包括预安装说明。通读每一行,如果你从一开始就彻底,你会节省时间。

“懒人工作两次”

第二:如果您遵循 Runfile 安装,以下是在 Ubuntu 中禁用 Nouveau 的说明。

    检查是否加载了 Nouveau 驱动程序。如果以下命令打印任何内容,则会加载 Nouveau 驱动程序

    $ lsmod | grep nouveau  
    

    在 /etc/modprobe.d/blacklist-nouveau.conf 创建一个文件,内容如下:

    blacklist nouveau
    options nouveau modeset=0
    

    重新生成内核initramfs:

    $ sudo update-initramfs -u
    

确保在完成后一直执行安装后操作。

最后:确保您正在使用的 Ubuntu 版本被您尝试安装的 CUDA 版本列为支持!!!!当我第一次安装时,我假设是最新的一切的版本都是最好的,但最新版本的 CUDA 不一定能在最新版本的 Ubuntu 上运行。一些更高级的用户可以让它工作,但我不能在那里指导你。检查 CUDA 工具包和 cuDNN 支持的版本(如果您正在使用它)。

祝你好运。安装 cuda 可能有点痛苦,有必要不要跳过任何安装步骤。 youtube 上还有一些有用的视频,如果您遇到困难,可能会有用。

【讨论】:

感谢您的回答!我刚刚安装了 Ubuntu (v. 18.04) 来运行我的 python 深度学习脚本。我找不到我应该在 Ubuntu 18.04 上使用的 CUDA 工具包版本(事实上,我在谷歌搜索时发现了许多不同的答案)。你推荐哪一个?如果我只是卸载 ubuntu 18.04 并安装 CUDA 官方支持的版本(如 ubuntu 17.10 或 16.04)会更容易吗? 是的。截至目前(2018 年 8 月 11 日)Cuda 工具包仅正式支持 17.10 和 16.04)我将对其中一个版本进行全新安装。此外,如果您打算使用 TensorFlow 进行深度学习,我将从官方推荐的版本开始。 CUDA 9.0 和 cuDNN 7.1。一旦你让这些工作,你可以尝试升级,如果你愿意(谷歌其他人如何修补它)但开始,我只会使用官方支持的版本。我试着只安装最新的东西,调试错误是一场噩梦。 如果你打算使用 python 和 TensorFlow 进行深度学习,windows 是最容易上手的环境,恕我直言。观看有关深度学习的 SentDex 视频以开始使用。如果您打算直接将 CUDA-C 和 C++ 直接连接到 GPU,那么请使用 Ubuntu,这样您就完全不必摆弄 Microsoft Visual Studio。如果您不确定从哪里开始,请查看 SentDex 和 Udacity。

在 Ubuntu 上安装 Tensorflow GPU / CUDA

...19-06-0409:49:29【问题描述】:我已经设置了一个Ubuntu18.04并尝试使用Python使Tensorflow2.2GPU工作(我有一个Nvidia/CUDA显卡)。即使在阅读了文档https://www.tensorflow.org/install/gp 查看详情

在 Ubuntu 上安装 CUDA + RAPIDS - “没有可用的内核映像”

...5:33:30【问题描述】:编辑:在下面的cmets中解决。我正在尝试开始使用CUDA+RAPIDS。为此,我使用Ubuntu18.04和NVIDIATeslaK80在GoogleCompu 查看详情

尝试在 Xampp (ubuntu 18.04) 上安装备份时无法登录到 wordpress 管理区域

】尝试在Xampp(ubuntu18.04)上安装备份时无法登录到wordpress管理区域【英文标题】:Unabeltologintowordpress\'sadminareawhentriedtoinstallthebackuponXampp(ubuntu18.04)【发布时间】:2020-02-1606:33:06【问题描述】:我最近在使用WordPress构建的网站时遇到... 查看详情

物理机安装ubuntu18.04+cuda+anaconda(简明图文教程)(代码片段)

...度、大白菜、老毛桃之类的U盘启动来安装,经过多次尝试发现安装Linux系统不行。因此就需要ultraiso工具来制作U盘启动盘来安装系统。      本操作文档仅作为操作记录使用,希望可以帮到初次安装的同学,自己也... 查看详情

物理机安装ubuntu18.04+cuda+anaconda(简明图文教程)(代码片段)

...度、大白菜、老毛桃之类的U盘启动来安装,经过多次尝试发现安装Linux系统不行。因此就需要ultraiso工具来制作U盘启动盘来安装系统。      本操作文档仅作为操作记录使用,希望可以帮到初次安装的同学,自己也... 查看详情

在 Ubuntu 18.04 上安装 RVM 时出错

...nUbuntu18.04【发布时间】:2018-12-2723:54:54【问题描述】:我尝试在新版本的Ubuntu18.04上安装RVM。但是我收到以下错误:"Errorrunning\'requirements_debian_libs_installgawkg++gccautoconfautomakebisonlibc6-dev 查看详情

ubuntu18.04安装nvidiadriver+cuda+cudnn

LinkUbuntu18.04安装Anaconda3 查看详情

ubuntu18.04安装nvidiadriver+cuda+cudnn

LinkUbuntu18.04安装Anaconda3 查看详情

我无法在 ubuntu 18.04 上安装 mysql

...u18.04【发布时间】:2020-06-0717:04:45【问题描述】:我正在尝试在我的ubuntu18.04上安装mysql-server,但出现dpkg错误sudoapt-getinstallmysql-server之后的终端输出是正在读取包列表...完成构建依赖树读取状态信息...完成以下附加包将是安装:... 查看详情

尝试在 linux ubuntu 18.04 LTS 上安装 docker 存储库时出错

】尝试在linuxubuntu18.04LTS上安装docker存储库时出错【英文标题】:Errorbytryinginstallingdockerrepositoryonlinuxubuntu18.04LTS【发布时间】:2019-07-2022:58:06【问题描述】:抱歉,语言是德语。所以我添加了docker的仓库:sudoadd-apt-repository"deb[arch=... 查看详情

ubuntu18.04安装cuda

参考技术AUbuntu16.04重装系统安装完所需的三个文件后,进入mnistCUDNN文件夹,对cpp程序进行编译后直接运行出现TestPassed即可!nvidia-smi后出现如下信息:NVIDIA-SMIhasfailedbecauseitcouldn'tcommunicatewiththeNVIDIAdriver.MakesurethatthelatestNVIDIAdriver... 查看详情

ubuntu18.04安装cuda9.0时,error:unsupportedcompiler:7.3.0的解决方案(代码片段)

...bin/gccsudoln-s/usr/bin/g++-6/usr/local/bin/g++然后重新尝试安装CUDA9.0即可。 查看详情

在 ubuntu 18.04 上安装 oracle 18cxe 的问题

...u18.04【发布时间】:2019-05-0322:43:27【问题描述】:我正在尝试配置OracleXE,但遇到以下问题:root@venky-Lenovo-G510:~#/etc/init.d/oracle-xe-18c配置/bin/df:无法识别的选项\'--direct\'尝试“/bin 查看详情

ubuntu18.04安装安装cuda和cudnn(代码片段)

一.安装cuda11.0cuda下载此处的cuda下载请根据自己的系统信息下载,否则使用会有问题。安装说明:wgethttps://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.runsudoshcuda_11.0.3_450.51.06_linux.ru 查看详情

如何使用 Tensorflow V.2.4 RTX 2070 Super Ubuntu 18.04 安装 Cuda 10.1

...:55:17【问题描述】:我是新手,正在学习机器学习。当我尝试按照说明https://www.tensorflow.org/install/gpu?hl=en 查看详情

在 Ubuntu 18.04 LTS 上安装 wordpress

....04LTS【发布时间】:2019-05-0907:45:56【问题描述】:我正在尝试,但遇到了问题。我正在一步一步做每一件事。我安装了这些东西,我也检查了状态:Apache(状态为活动)Mysql(状态为活动)PHP(PHP5.6.38-3+ubuntu18.04.1+deb.sury.org+1)当我... 查看详情

ubuntu18.04/20.04cv环境配置(上):cuda11.1+cudnn安装配置(代码片段)

...驱动的关系2.下载安装2.1 下载CUDA文件DownloadInstallerforLinuxUbuntu20.04x86_642.2下载cudnn文件3.配置测试参考连接:1.版本对应无论采用哪一种方式,首先都需要更新Ubuntu软件源和升级到最新版本的软件包。由于国内从Ubuntu官方软... 查看详情

ubuntu18.04/20.04cv环境配置(上):cuda11.1+cudnn安装配置(代码片段)

...驱动的关系2.下载安装2.1 下载CUDA文件DownloadInstallerforLinuxUbuntu20.04x86_642.2下载cudnn文件3.配置测试参考连接:1.版本对应无论采用哪一种方式,首先都需要更新Ubuntu软件源和升级到最新版本的软件包。由于国内从Ubuntu官方软... 查看详情