

bashrc file sudo vim ~/.bashrcĮxport PATH=/usr/local/cuda-9.1/bin$ #Note that depending on your version, modify cuda-9.2/9.0
NVIDIA CUDA DRIVERS UBUNTU 18.04 340 INSTALL
Then, continue to install the 3 patch es as follows: sudo sh cuda_9.1.85.1_n sudo sh cuda_9.1.85.2_n sudo sh cuda_9.1.85.3_nĪfter installation, add the following two to the.
NVIDIA CUDA DRIVERS UBUNTU 18.04 340 DRIVER
It should be noted that the video card driver has been installed before, so when you ask if you want to install the video card driver, you can select no, and other options are the default path or yes. Gcc version 4.8 is displayed, indicating that gcc 4.8 is installed successfully.Įnter the command to install the Base Installer: sudo sh cuda_9.1.85_387.26_n Then look at the gcc and g + + version numbers: gcc -v g++ -v You need to change the g + + link to g++-4.8: sudo mv g++ g++.bak Similarly, the same changes are made to g + + You need to change it to link to gcc-4.8 as follows: sudo mv gcc gcc.bak #backups It is found that GCC is linked to gcc-7.0.

The following results are displayed lrwxrwxrwx 1 root root 7th May 16 18:16 /usr/bin/gcc -> gcc-7.3 Therefore, manual degradation: sudo apt-get install gcc-4.8Įnter / usr/bin directory after installation $ls -l gcc* Since CUDA 9.0 only supports GCC 6.0 and below, Ubuntu 18.04 pre installs GCC version 7.3, To start the installation, take cuda9.0 as an example: Note that some versions have patches to download as well. To install CUDA, please note that CUDA usually corresponds to the version of cudnn.įirst of all, select CUDA, or the old version (circled in red), official website address: OK driver installation is completed, restart, check the system configuration = > details = > about whether the graphics processing corresponds to its own independent graphics card. You can choose to install all the recommended drivers as follows $ sudo apt install nvidia-driver-390 You can choose to install all the recommended drivers as follows $ sudo ubuntu-drivers autoinstall It is recommended to choose the one recommended. Sometimes there are several options for different drivers at different times. Modalias : pci:v000010DEd00001B82sv00007377sd000011DCbc03sc00i00ĭriver : nvidia-driver-390 - distro non-free recommendedĭriver : xserver-xorg-video-nouveau - distro free builtinĪs you can see, here is a GTX 1070Ti device, and the corresponding driver is nvidia-390 (recommended). Execute command: $ ubuntu-drivers devices Install GPU driver and CUDA+cuDNN (for Ubuntu 18.04) 1, Video card driver installation:įirst, examine the model of your NVIDIA graphics card and recommended drivers.
