CUDA installation fails

Hello,

While trying to install CUDA 10.2 on my Ubuntu machine using this method:

wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run
sudo sh cuda_10.2.89_440.33.01_linux.run

I’ve met problems:

pavel@ALABAMA:~/Downloads$ sudo sh cuda_10.2.89_440.33.01_linux.run
[sudo] password for pavel: 
 Installation failed. See log at /var/log/cuda-installer.log for details.
pavel@ALABAMA:~/Downloads$ more /var/log/cuda-installer.log
[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc

[INFO]: gcc version: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) 

[INFO]: Initializing menu
[INFO]: Setup complete
[INFO]: Initializing writeable menu
[INFO]: Initializing writeable menu
[INFO]: Initializing writeable menu
[INFO]: Components to install: 
[INFO]: Driver
[INFO]: 440.33.01
[INFO]: Executing NVIDIA-Linux-x86_64-440.33.01.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd  2>&1
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed.
[ERROR]: Install of 440.33.01 failed, quitting
pavel@ALABAMA:~/Downloads$

Help, please.

It’s only using deb(local) approach I could install CUDA:

pavel@ALABAMA:~$ nvidia-smi
Wed Mar 11 15:33:21 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 On | 00000000:01:00.0 Off | N/A |
| N/A 44C P3 N/A / N/A | 209MiB / 2002MiB | 1% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1028 G /usr/lib/xorg/Xorg 115MiB |
| 0 1313 G /usr/bin/gnome-shell 93MiB |
±----------------------------------------------------------------------------+