Issue with installing driver+ toolkit / Ubuntu 18.04 / any idea?

10.1 runfile method returns:

sudo ./cuda_10.1.105_418.39_linux.run.1 
 Completed with errors. See log at /var/log/cuda-installer.log for details.

running toolkit installation returns:

sudo apt install nvidia-cuda-toolkit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cuda-10-1 cuda-command-line-tools-10-1 cuda-compiler-10-1
  cuda-cudart-dev-10-1 cuda-cufft-dev-10-1 cuda-cuobjdump-10-1 cuda-cupti-10-1
  cuda-curand-dev-10-1 cuda-cusolver-dev-10-1 cuda-cusparse-dev-10-1
  cuda-demo-suite-10-1 cuda-documentation-10-1 cuda-driver-dev-10-1
  cuda-drivers cuda-gdb-10-1 cuda-gpu-library-advisor-10-1
  cuda-libraries-dev-10-1 cuda-memcheck-10-1 cuda-misc-headers-10-1
  cuda-npp-dev-10-1 cuda-nsight-10-1 cuda-nsight-compute-10-1
  cuda-nsight-systems-10-1 cuda-nvcc-10-1 cuda-nvdisasm-10-1
  cuda-nvgraph-dev-10-1 cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1
  cuda-nvprof-10-1 cuda-nvprune-10-1 cuda-nvrtc-dev-10-1 cuda-nvtx-10-1
  cuda-nvvp-10-1 cuda-runtime-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1
  cuda-toolkit-10-1 cuda-tools-10-1 cuda-visual-tools-10-1 libcublas-dev
  libnvidia-cfg1-418 libnvidia-common-418 libnvidia-decode-418
  libnvidia-encode-418 libnvidia-fbc1-418 libnvidia-gl-418 libnvidia-ifr1-418
  libxnvctrl0 nvidia-compute-utils-418 nvidia-dkms-418 nvidia-driver-418
  nvidia-kernel-common-418 nvidia-kernel-source-418 nvidia-modprobe
  nvidia-prime nvidia-settings nvidia-utils-418 screen-resolution-extra
  xserver-xorg-video-nvidia-418
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1
  libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1 libnppc9.1
  libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1 libnppif9.1
  libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1
  libnvblas9.1 libnvgraph9.1 libnvrtc9.1 libnvtoolsext1 libnvvm3 libthrust-dev
  libvdpau-dev nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb
  nvidia-opencl-dev nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev
  opencl-c-headers
Suggested packages:
  libvdpau-doc libcupti-dev nvidia-driver libpoclu-dev
Recommended packages:
  libnvcuvid1
The following NEW packages will be installed:
  libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1
  libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1 libnppc9.1
  libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1 libnppif9.1
  libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1
  libnvblas9.1 libnvgraph9.1 libnvrtc9.1 libnvtoolsext1 libnvvm3 libthrust-dev
  libvdpau-dev nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb
  nvidia-cuda-toolkit nvidia-opencl-dev nvidia-profiler nvidia-visual-profiler
  ocl-icd-opencl-dev opencl-c-headers
0 upgraded, 37 newly installed, 0 to remove and 0 not upgraded.
Need to get 772 MB of archives.
After this operation, 1,774 MB of additional disk space will be used.
Do you want to continue? [Y/n]

running local deb file 10.1 installation returns:

sudo apt install cuda
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  cuda
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,514 B of archives.
After this operation, 25.6 kB of additional disk space will be used.
Selecting previously unselected package cuda.
(Reading database ... 325720 files and directories currently installed.)
Preparing to unpack .../cuda_10.1.105-1_amd64.deb ...
Unpacking cuda (10.1.105-1) ...
Setting up cuda (10.1.105-1) ...

trying again

$ sudo apt purge cuda*
[sudo] password for nvidia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'cuda-nvprune-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvprune-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvgraph-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvgraph-10-1' for glob 'cuda*'
Note, selecting 'cuda-cublas-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-gdb-10-0' for glob 'cuda*'
Note, selecting 'cuda-gdb-10-1' for glob 'cuda*'
Note, selecting 'cuda-visual-tools-10-0' for glob 'cuda*'
Note, selecting 'cuda-visual-tools-10-1' for glob 'cuda*'
Note, selecting 'cuda-curand-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-curand-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-cupti-10-0' for glob 'cuda*'
Note, selecting 'cuda-cupti-10-1' for glob 'cuda*'
Note, selecting 'cuda-libraries-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-libraries-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1204' for glob 'cuda*'
Note, selecting 'cuda-nvjpeg-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvjpeg-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvrtc-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvrtc-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-minimal-build-10-1' for glob 'cuda*'
Note, selecting 'cuda-drivers' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1404' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1410' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1504' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1604' for glob 'cuda*'
Note, selecting 'cuda-license-7-5' for glob 'cuda*'
Note, selecting 'cuda-libraries-10-1' for glob 'cuda*'
Note, selecting 'cuda-runtime-10-1' for glob 'cuda*'
Note, selecting 'cuda-cusolver-10-0' for glob 'cuda*'
Note, selecting 'cuda-cusolver-10-1' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1804' for glob 'cuda*'
Note, selecting 'cuda-cusparse-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-cusparse-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvrtc-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvrtc-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvjpeg-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvjpeg-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-cufft-10-0' for glob 'cuda*'
Note, selecting 'cuda-cufft-10-1' for glob 'cuda*'
Note, selecting 'cuda-nsight-systems-10-1' for glob 'cuda*'
Note, selecting 'cuda-cusparse-10-0' for glob 'cuda*'
Note, selecting 'cuda-cusparse-10-1' for glob 'cuda*'
Note, selecting 'cuda-npp-10-0' for glob 'cuda*'
Note, selecting 'cuda-npp-10-1' for glob 'cuda*'
Note, selecting 'cuda-tools-10-0' for glob 'cuda*'
Note, selecting 'cuda-tools-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvtx-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvtx-10-1' for glob 'cuda*'
Note, selecting 'cuda-cudart-10-0' for glob 'cuda*'
Note, selecting 'cuda-cudart-10-1' for glob 'cuda*'
Note, selecting 'cuda-license-10-0' for glob 'cuda*'
Note, selecting 'cuda-license-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvdisasm-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvdisasm-10-1' for glob 'cuda*'
Note, selecting 'cuda-samples-10-0' for glob 'cuda*'
Note, selecting 'cuda-samples-10-1' for glob 'cuda*'
Note, selecting 'cuda-documentation-10-0' for glob 'cuda*'
Note, selecting 'cuda-documentation-10-1' for glob 'cuda*'
Note, selecting 'cuda-compat-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvcc-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvcc-10-1' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1404-7-5-local' for glob 'cuda*'
Note, selecting 'cuda-nvvp-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvvp-10-1' for glob 'cuda*'
Note, selecting 'cuda-toolkit-10-0' for glob 'cuda*'
Note, selecting 'cuda-toolkit-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvgraph-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvgraph-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39' for glob 'cuda*'
Note, selecting 'cuda-cudart-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-cudart-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvml-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvml-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-gpu-library-advisor-10-0' for glob 'cuda*'
Note, selecting 'cuda-gpu-library-advisor-10-1' for glob 'cuda*'
Note, selecting 'cuda-cublas-10-0' for glob 'cuda*'
Note, selecting 'cuda-core-10-1' for glob 'cuda*'
Note, selecting 'cuda-cusolver-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-cusolver-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-sanitizer-api-10-1' for glob 'cuda*'
Note, selecting 'cuda-compiler-10-0' for glob 'cuda*'
Note, selecting 'cuda-compiler-10-1' for glob 'cuda*'
Note, selecting 'cuda-demo-suite-10-1' for glob 'cuda*'
Note, selecting 'cuda-npp-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-npp-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-nsight-10-0' for glob 'cuda*'
Note, selecting 'cuda-nsight-10-1' for glob 'cuda*'
Note, selecting 'cuda-curand-10-0' for glob 'cuda*'
Note, selecting 'cuda-curand-10-1' for glob 'cuda*'
Note, selecting 'cuda-command-line-tools-10-0' for glob 'cuda*'
Note, selecting 'cuda-command-line-tools-10-1' for glob 'cuda*'
Note, selecting 'cuda-cufft-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-cufft-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-driver-dev-10-0' for glob 'cuda*'
Note, selecting 'cuda-driver-dev-10-1' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1504-7-5-local' for glob 'cuda*'
Note, selecting 'cuda-10-1' for glob 'cuda*'
Note, selecting 'cuda-repo-ubuntu1804-10-0-local-10.0.117-410.38' for glob 'cuda*'
Note, selecting 'cuda-memcheck-10-0' for glob 'cuda*'
Note, selecting 'cuda-memcheck-10-1' for glob 'cuda*'
Note, selecting 'cuda' for glob 'cuda*'
Note, selecting 'cuda-gdb-src-10-1' for glob 'cuda*'
Note, selecting 'cuda-misc-headers-10-0' for glob 'cuda*'
Note, selecting 'cuda-misc-headers-10-1' for glob 'cuda*'
Note, selecting 'cuda-cuobjdump-10-0' for glob 'cuda*'
Note, selecting 'cuda-cuobjdump-10-1' for glob 'cuda*'
Note, selecting 'cuda-nsight-compute-10-0' for glob 'cuda*'
Note, selecting 'cuda-nsight-compute-10-1' for glob 'cuda*'
Note, selecting 'cuda-nvprof-10-0' for glob 'cuda*'
Note, selecting 'cuda-nvprof-10-1' for glob 'cuda*'
Package 'cuda-license-7-5' is not installed, so not removed
Package 'cuda-repo-ubuntu1204' is not installed, so not removed
Package 'cuda-repo-ubuntu1404' is not installed, so not removed
Package 'cuda-repo-ubuntu1404-7-5-local' is not installed, so not removed
Package 'cuda-repo-ubuntu1410' is not installed, so not removed
Package 'cuda-repo-ubuntu1504' is not installed, so not removed
Package 'cuda-repo-ubuntu1504-7-5-local' is not installed, so not removed
Package 'cuda-repo-ubuntu1604' is not installed, so not removed
Package 'cuda-core-10-1' is not installed, so not removed
Package 'cuda-compat-10-1' is not installed, so not removed
Package 'cuda-minimal-build-10-1' is not installed, so not removed
Package 'cuda-gdb-src-10-1' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libnvidia-cfg1-418 libnvidia-common-418 libnvidia-decode-418 libnvidia-encode-418 libnvidia-fbc1-418 libnvidia-gl-418
  libnvidia-ifr1-418 libxi-dev libxmu-dev libxmu-headers libxnvctrl0 nvidia-compute-utils-418 nvidia-dkms-418 nvidia-driver-418
  nvidia-kernel-common-418 nvidia-kernel-source-418 nvidia-modprobe nvidia-prime nvidia-settings nvidia-utils-418
  screen-resolution-extra xserver-xorg-video-nvidia-418
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  cuda* cuda-10-1* cuda-command-line-tools-10-0* cuda-command-line-tools-10-1* cuda-compiler-10-0* cuda-compiler-10-1*
  cuda-cublas-10-0* cuda-cublas-dev-10-0* cuda-cudart-10-0* cuda-cudart-10-1* cuda-cudart-dev-10-0* cuda-cudart-dev-10-1*
  cuda-cufft-10-0* cuda-cufft-10-1* cuda-cufft-dev-10-0* cuda-cufft-dev-10-1* cuda-cuobjdump-10-0* cuda-cuobjdump-10-1*
  cuda-cupti-10-0* cuda-cupti-10-1* cuda-curand-10-0* cuda-curand-10-1* cuda-curand-dev-10-0* cuda-curand-dev-10-1*
  cuda-cusolver-10-0* cuda-cusolver-10-1* cuda-cusolver-dev-10-0* cuda-cusolver-dev-10-1* cuda-cusparse-10-0* cuda-cusparse-10-1*
  cuda-cusparse-dev-10-0* cuda-cusparse-dev-10-1* cuda-demo-suite-10-1* cuda-documentation-10-0* cuda-documentation-10-1*
  cuda-driver-dev-10-0* cuda-driver-dev-10-1* cuda-drivers* cuda-gdb-10-0* cuda-gdb-10-1* cuda-gpu-library-advisor-10-0*
  cuda-gpu-library-advisor-10-1* cuda-libraries-10-1* cuda-libraries-dev-10-0* cuda-libraries-dev-10-1* cuda-license-10-0*
  cuda-license-10-1* cuda-memcheck-10-0* cuda-memcheck-10-1* cuda-misc-headers-10-0* cuda-misc-headers-10-1* cuda-npp-10-0*
  cuda-npp-10-1* cuda-npp-dev-10-0* cuda-npp-dev-10-1* cuda-nsight-10-0* cuda-nsight-10-1* cuda-nsight-compute-10-0*
  cuda-nsight-compute-10-1* cuda-nsight-systems-10-1* cuda-nvcc-10-0* cuda-nvcc-10-1* cuda-nvdisasm-10-0* cuda-nvdisasm-10-1*
  cuda-nvgraph-10-0* cuda-nvgraph-10-1* cuda-nvgraph-dev-10-0* cuda-nvgraph-dev-10-1* cuda-nvjpeg-10-0* cuda-nvjpeg-10-1*
  cuda-nvjpeg-dev-10-0* cuda-nvjpeg-dev-10-1* cuda-nvml-dev-10-0* cuda-nvml-dev-10-1* cuda-nvprof-10-0* cuda-nvprof-10-1*
  cuda-nvprune-10-0* cuda-nvprune-10-1* cuda-nvrtc-10-0* cuda-nvrtc-10-1* cuda-nvrtc-dev-10-0* cuda-nvrtc-dev-10-1* cuda-nvtx-10-0*
  cuda-nvtx-10-1* cuda-nvvp-10-0* cuda-nvvp-10-1* cuda-repo-ubuntu1804* cuda-repo-ubuntu1804-10-0-local-10.0.117-410.38*
  cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39* cuda-runtime-10-1* cuda-samples-10-0* cuda-samples-10-1* cuda-sanitizer-api-10-1*
  cuda-toolkit-10-0* cuda-toolkit-10-1* cuda-tools-10-0* cuda-tools-10-1* cuda-visual-tools-10-0* cuda-visual-tools-10-1*
  libcublas-dev* libcublas10*
0 upgraded, 0 newly installed, 101 to remove and 0 not upgraded.
After this operation, 10.4 GB disk space will be freed.
Do you want to continue? [Y/n]
After this operation, 10.4 GB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 325722 files and directories currently installed.)
Removing cuda (10.1.105-1) ...
Removing cuda-10-1 (10.1.105-1) ...
Removing cuda-toolkit-10-0 (10.0.130-1) ...
Removing cuda-tools-10-0 (10.0.130-1) ...
Removing cuda-command-line-tools-10-0 (10.0.130-1) ...
Removing cuda-toolkit-10-1 (10.1.105-1) ...
Removing cuda-tools-10-1 (10.1.105-1) ...
Removing cuda-command-line-tools-10-1 (10.1.105-1) ...
Removing cuda-compiler-10-0 (10.0.130-1) ...
Removing cuda-compiler-10-1 (10.1.105-1) ...
Removing cuda-libraries-dev-10-0 (10.0.130-1) ...
Removing cuda-visual-tools-10-0 (10.0.130-1) ...
Removing cuda-cupti-10-0 (10.0.130-1) ...
Removing cuda-cupti-10-1 (10.1.105-1) ...
Removing cuda-visual-tools-10-1 (10.1.105-1) ...
Removing cuda-demo-suite-10-1 (10.1.105-1) ...
Removing cuda-runtime-10-1 (10.1.105-1) ...
Removing cuda-libraries-10-1 (10.1.105-1) ...
Removing cuda-documentation-10-0 (10.0.130-1) ...
Removing cuda-samples-10-0 (10.0.130-1) ...
Removing cuda-cufft-dev-10-0 (10.0.130-1) ...
Removing cuda-cufft-10-0 (10.0.130-1) ...
Removing cuda-libraries-dev-10-1 (10.1.105-1) ...
Removing cuda-documentation-10-1 (10.1.105-1) ...
Removing cuda-samples-10-1 (10.1.105-1) ...
Removing cuda-cufft-dev-10-1 (10.1.105-1) ...
Removing cuda-cufft-10-1 (10.1.105-1) ...
Removing cuda-gdb-10-0 (10.0.130-1) ...
Removing cuda-cuobjdump-10-0 (10.0.130-1) ...
Removing cuda-gdb-10-1 (10.1.105-1) ...
Removing cuda-cuobjdump-10-1 (10.1.105-1) ...
Removing cuda-curand-dev-10-0 (10.0.130-1) ...
Removing cuda-curand-10-0 (10.0.130-1) ...
Removing cuda-curand-dev-10-1 (10.1.105-1) ...
Removing cuda-curand-10-1 (10.1.105-1) ...
Removing cuda-cusolver-dev-10-0 (10.0.130-1) ...
Removing cuda-cusolver-10-0 (10.0.130-1) ...
Removing cuda-cusolver-dev-10-1 (10.1.105-1) ...
Removing cuda-cusolver-10-1 (10.1.105-1) ...
Removing cuda-cusparse-dev-10-0 (10.0.130-1) ...
Removing cuda-cusparse-10-0 (10.0.130-1) ...
Removing cuda-cusparse-dev-10-1 (10.1.105-1) ...
Removing cuda-cusparse-10-1 (10.1.105-1) ...
Removing cuda-drivers (418.39-1) ...
Removing cuda-gpu-library-advisor-10-0 (10.0.130-1) ...
Removing cuda-gpu-library-advisor-10-1 (10.1.105-1) ...
Removing cuda-nvtx-10-0 (10.0.130-1) ...
Removing cuda-nvrtc-dev-10-0 (10.0.130-1) ...
Removing cuda-nvrtc-10-0 (10.0.130-1) ...
Removing cuda-nvgraph-dev-10-1 (10.1.105-1) ...
Removing cuda-nvgraph-10-1 (10.1.105-1) ...
Removing libcublas-dev (10.1.0.105-1) ...
Removing cuda-memcheck-10-0 (10.0.130-1) ...
Removing cuda-memcheck-10-1 (10.1.105-1) ...
Removing cuda-nvcc-10-0 (10.0.130-1) ...
Removing cuda-misc-headers-10-0 (10.0.130-1) ...
Removing cuda-nvcc-10-1 (10.1.105-1) ...
Removing cuda-misc-headers-10-1 (10.1.105-1) ...
Removing cuda-npp-dev-10-0 (10.0.130-1) ...
Removing cuda-npp-10-0 (10.0.130-1) ...
Removing cuda-npp-dev-10-1 (10.1.105-1) ...
Removing cuda-npp-10-1 (10.1.105-1) ...
Removing cuda-nsight-10-0 (10.0.130-1) ...
Removing cuda-nsight-10-1 (10.1.105-1) ...
Removing cuda-nsight-compute-10-0 (10.0.130-1) ...
Removing cuda-nsight-compute-10-1 (10.1.105-1) ...
Removing cuda-nsight-systems-10-1 (10.1.105-1) ...
Removing cuda-nvdisasm-10-0 (10.0.130-1) ...
Removing cuda-nvdisasm-10-1 (10.1.105-1) ...
Removing cuda-nvgraph-dev-10-0 (10.0.130-1) ...
Removing cuda-nvgraph-10-0 (10.0.130-1) ...
Removing cuda-nvjpeg-dev-10-0 (10.0.130-1) ...
Removing cuda-nvjpeg-10-0 (10.0.130-1) ...
Removing cuda-nvjpeg-dev-10-1 (10.1.105-1) ...
Removing cuda-nvjpeg-10-1 (10.1.105-1) ...
Removing cuda-nvml-dev-10-0 (10.0.130-1) ...
Removing cuda-nvml-dev-10-1 (10.1.105-1) ...
Removing cuda-nvprof-10-0 (10.0.130-1) ...
Removing cuda-nvprof-10-1 (10.1.105-1) ...
Removing cuda-nvprune-10-0 (10.0.130-1) ...
Removing cuda-nvprune-10-1 (10.1.105-1) ...
dpkg: warning: while removing cuda-nvprune-10-1, directory '/usr/local/cuda-10.1/bin' not empty so not removed
Removing cuda-nvrtc-dev-10-1 (10.1.105-1) ...
Removing cuda-nvrtc-10-1 (10.1.105-1) ...
Removing cuda-nvtx-10-1 (10.1.105-1) ...
Removing cuda-nvvp-10-0 (10.0.130-1) ...
Removing cuda-nvvp-10-1 (10.1.105-1) ...
Removing cuda-repo-ubuntu1804 (10.1.105-1) ...
Removing cuda-repo-ubuntu1804-10-0-local-10.0.117-410.38 (1.0-1) ...
Removing cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39 (1.0-1) ...
Removing cuda-sanitizer-api-10-1 (10.1.105-1) ...
Removing libcublas10 (10.1.0.105-1) ...
Removing cuda-cublas-dev-10-0 (10.0.130-1) ...
Removing cuda-cublas-10-0 (10.0.130-1) ...
Removing cuda-cudart-dev-10-0 (10.0.130-1) ...
Removing cuda-cudart-10-0 (10.0.130-1) ...
Removing cuda-cudart-dev-10-1 (10.1.105-1) ...
Removing cuda-cudart-10-1 (10.1.105-1) ...
Removing cuda-driver-dev-10-0 (10.0.130-1) ...
Removing cuda-driver-dev-10-1 (10.1.105-1) ...
Removing cuda-license-10-0 (10.0.130-1) ...
Removing cuda-license-10-1 (10.1.105-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 302899 files and directories currently installed.)
Purging configuration files for cuda-cupti-10-1 (10.1.105-1) ...
Purging configuration files for cuda-nvgraph-10-0 (10.0.130-1) ...
Purging configuration files for cuda-cudart-10-1 (10.1.105-1) ...
Purging configuration files for cuda-nvcc-10-1 (10.1.105-1) ...
Purging configuration files for cuda-cusparse-10-0 (10.0.130-1) ...
Purging configuration files for cuda-cusolver-10-1 (10.1.105-1) ...
Purging configuration files for cuda-nvjpeg-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nvtx-10-1 (10.1.105-1) ...
Purging configuration files for cuda-curand-10-1 (10.1.105-1) ...
Purging configuration files for cuda-cufft-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nsight-compute-10-0 (10.0.130-1) ...
Purging configuration files for cuda-cupti-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nvgraph-10-1 (10.1.105-1) ...
Purging configuration files for cuda-cudart-10-0 (10.0.130-1) ...
Purging configuration files for cuda-npp-10-0 (10.0.130-1) ...
Purging configuration files for cuda-visual-tools-10-0 (10.0.130-1) ...
Purging configuration files for cuda-cudart-dev-10-1 (10.1.105-1) ...
dpkg: warning: while removing cuda-cudart-dev-10-1, directory '/usr/local/cuda-10.1/targets/x86_64-linux/include' not empty so not removed
Purging configuration files for cuda-cusparse-10-1 (10.1.105-1) ...
Purging configuration files for cuda-cusolver-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nvjpeg-10-1 (10.1.105-1) ...
Purging configuration files for cuda-curand-10-0 (10.0.130-1) ...
Purging configuration files for cuda-sanitizer-api-10-1 (10.1.105-1) ...
Purging configuration files for cuda-cufft-10-1 (10.1.105-1) ...
Purging configuration files for cuda-nvprof-10-1 (10.1.105-1) ...
Purging configuration files for cuda-nvrtc-10-1 (10.1.105-1) ...
Purging configuration files for libcublas10 (10.1.0.105-1) ...
Purging configuration files for cuda-cublas-10-0 (10.0.130-1) ...
Purging configuration files for cuda-npp-10-1 (10.1.105-1) ...
Purging configuration files for cuda-visual-tools-10-1 (10.1.105-1) ...
Purging configuration files for cuda-toolkit-10-0 (10.0.130-1) ...
Purging configuration files for cuda-cudart-dev-10-0 (10.0.130-1) ...
Purging configuration files for cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39 (1.0-1) ...
Purging configuration files for cuda-repo-ubuntu1804 (10.1.105-1) ...
Purging configuration files for cuda-nvcc-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nvprof-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nvrtc-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nvtx-10-0 (10.0.130-1) ...
Purging configuration files for cuda-nsight-systems-10-1 (10.1.105-1) ...
Purging configuration files for cuda-repo-ubuntu1804-10-0-local-10.0.117-410.38 (1.0-1) ...
Purging configuration files for cuda-toolkit-10-1 (10.1.105-1) ...
Purging configuration files for cuda-nsight-compute-10-1 (10.1.105-1) ...

using network deb

sudo apt-get install cuda
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cuda-10-1 cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cudart-10-1 cuda-cudart-dev-10-1 cuda-cufft-10-1
  cuda-cufft-dev-10-1 cuda-cuobjdump-10-1 cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1 cuda-cusolver-10-1
  cuda-cusolver-dev-10-1 cuda-cusparse-10-1 cuda-cusparse-dev-10-1 cuda-demo-suite-10-1 cuda-documentation-10-1 cuda-driver-dev-10-1
  cuda-drivers cuda-gdb-10-1 cuda-gpu-library-advisor-10-1 cuda-libraries-10-1 cuda-libraries-dev-10-1 cuda-license-10-1
  cuda-memcheck-10-1 cuda-misc-headers-10-1 cuda-npp-10-1 cuda-npp-dev-10-1 cuda-nsight-10-1 cuda-nsight-compute-10-1
  cuda-nsight-systems-10-1 cuda-nvcc-10-1 cuda-nvdisasm-10-1 cuda-nvgraph-10-1 cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1
  cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1 cuda-nvprof-10-1 cuda-nvprune-10-1 cuda-nvrtc-10-1 cuda-nvrtc-dev-10-1 cuda-nvtx-10-1
  cuda-nvvp-10-1 cuda-runtime-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1 cuda-toolkit-10-1 cuda-tools-10-1
  cuda-visual-tools-10-1 libcublas-dev libcublas10
The following NEW packages will be installed:
  cuda cuda-10-1 cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cudart-10-1 cuda-cudart-dev-10-1 cuda-cufft-10-1
  cuda-cufft-dev-10-1 cuda-cuobjdump-10-1 cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1 cuda-cusolver-10-1
  cuda-cusolver-dev-10-1 cuda-cusparse-10-1 cuda-cusparse-dev-10-1 cuda-demo-suite-10-1 cuda-documentation-10-1 cuda-driver-dev-10-1
  cuda-drivers cuda-gdb-10-1 cuda-gpu-library-advisor-10-1 cuda-libraries-10-1 cuda-libraries-dev-10-1 cuda-license-10-1
  cuda-memcheck-10-1 cuda-misc-headers-10-1 cuda-npp-10-1 cuda-npp-dev-10-1 cuda-nsight-10-1 cuda-nsight-compute-10-1
  cuda-nsight-systems-10-1 cuda-nvcc-10-1 cuda-nvdisasm-10-1 cuda-nvgraph-10-1 cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1
  cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1 cuda-nvprof-10-1 cuda-nvprune-10-1 cuda-nvrtc-10-1 cuda-nvrtc-dev-10-1 cuda-nvtx-10-1
  cuda-nvvp-10-1 cuda-runtime-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1 cuda-toolkit-10-1 cuda-tools-10-1
  cuda-visual-tools-10-1 libcublas-dev libcublas10
0 upgraded, 53 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,532 MB of archives.
After this operation, 3,862 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Selecting previously unselected package cuda-license-10-1.
(Reading database ... 302893 files and directories currently installed.)
Preparing to unpack .../00-cuda-license-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-license-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-misc-headers-10-1.
Preparing to unpack .../01-cuda-misc-headers-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-misc-headers-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvcc-10-1.
Preparing to unpack .../02-cuda-nvcc-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvcc-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cuobjdump-10-1.
Preparing to unpack .../03-cuda-cuobjdump-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cuobjdump-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvprune-10-1.
Preparing to unpack .../04-cuda-nvprune-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvprune-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-compiler-10-1.
Preparing to unpack .../05-cuda-compiler-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-compiler-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvdisasm-10-1.
Preparing to unpack .../06-cuda-nvdisasm-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvdisasm-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-gdb-10-1.
Preparing to unpack .../07-cuda-gdb-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-gdb-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvprof-10-1.
Preparing to unpack .../08-cuda-nvprof-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvprof-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-sanitizer-api-10-1.
Preparing to unpack .../09-cuda-sanitizer-api-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-sanitizer-api-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-memcheck-10-1.
Preparing to unpack .../10-cuda-memcheck-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-memcheck-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cudart-10-1.
Preparing to unpack .../11-cuda-cudart-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cudart-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-driver-dev-10-1.
Preparing to unpack .../12-cuda-driver-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-driver-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cudart-dev-10-1.
Preparing to unpack .../13-cuda-cudart-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cudart-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cupti-10-1.
Preparing to unpack .../14-cuda-cupti-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cupti-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-gpu-library-advisor-10-1.
Preparing to unpack .../15-cuda-gpu-library-advisor-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-gpu-library-advisor-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvtx-10-1.
Preparing to unpack .../16-cuda-nvtx-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvtx-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-command-line-tools-10-1.
Preparing to unpack .../17-cuda-command-line-tools-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-command-line-tools-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nsight-10-1.
Preparing to unpack .../18-cuda-nsight-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nsight-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvvp-10-1.
Preparing to unpack .../19-cuda-nvvp-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvvp-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvrtc-10-1.
Preparing to unpack .../20-cuda-nvrtc-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvrtc-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvrtc-dev-10-1.
Preparing to unpack .../21-cuda-nvrtc-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvrtc-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cusolver-10-1.
Preparing to unpack .../22-cuda-cusolver-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cusolver-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cusolver-dev-10-1.
Preparing to unpack .../23-cuda-cusolver-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cusolver-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package libcublas10.
Preparing to unpack .../24-libcublas10_10.1.0.105-1_amd64.deb ...
Unpacking libcublas10 (10.1.0.105-1) ...
Selecting previously unselected package libcublas-dev.
Preparing to unpack .../25-libcublas-dev_10.1.0.105-1_amd64.deb ...
Unpacking libcublas-dev (10.1.0.105-1) ...
Selecting previously unselected package cuda-cufft-10-1.
Preparing to unpack .../26-cuda-cufft-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cufft-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cufft-dev-10-1.
Preparing to unpack .../27-cuda-cufft-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cufft-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-curand-10-1.
Preparing to unpack .../28-cuda-curand-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-curand-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-curand-dev-10-1.
Preparing to unpack .../29-cuda-curand-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-curand-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cusparse-10-1.
Preparing to unpack .../30-cuda-cusparse-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cusparse-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-cusparse-dev-10-1.
Preparing to unpack .../31-cuda-cusparse-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-cusparse-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-npp-10-1.
Preparing to unpack .../32-cuda-npp-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-npp-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-npp-dev-10-1.
Preparing to unpack .../33-cuda-npp-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-npp-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvml-dev-10-1.
Preparing to unpack .../34-cuda-nvml-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvml-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvjpeg-10-1.
Preparing to unpack .../35-cuda-nvjpeg-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvjpeg-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvjpeg-dev-10-1.
Preparing to unpack .../36-cuda-nvjpeg-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvjpeg-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nsight-compute-10-1.
Preparing to unpack .../37-cuda-nsight-compute-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nsight-compute-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nsight-systems-10-1.
Preparing to unpack .../38-cuda-nsight-systems-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nsight-systems-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvgraph-10-1.
Preparing to unpack .../39-cuda-nvgraph-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvgraph-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-nvgraph-dev-10-1.
Preparing to unpack .../40-cuda-nvgraph-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-nvgraph-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-visual-tools-10-1.
Preparing to unpack .../41-cuda-visual-tools-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-visual-tools-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-tools-10-1.
Preparing to unpack .../42-cuda-tools-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-tools-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-samples-10-1.
Preparing to unpack .../43-cuda-samples-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-samples-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-documentation-10-1.
Preparing to unpack .../44-cuda-documentation-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-documentation-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-libraries-dev-10-1.
Preparing to unpack .../45-cuda-libraries-dev-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-libraries-dev-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-toolkit-10-1.
Preparing to unpack .../46-cuda-toolkit-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-toolkit-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-drivers.
Preparing to unpack .../47-cuda-drivers_418.39-1_amd64.deb ...
Unpacking cuda-drivers (418.39-1) ...
Selecting previously unselected package cuda-libraries-10-1.
Preparing to unpack .../48-cuda-libraries-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-libraries-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-runtime-10-1.
Preparing to unpack .../49-cuda-runtime-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-runtime-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-demo-suite-10-1.
Preparing to unpack .../50-cuda-demo-suite-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-demo-suite-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda-10-1.
Preparing to unpack .../51-cuda-10-1_10.1.105-1_amd64.deb ...
Unpacking cuda-10-1 (10.1.105-1) ...
Selecting previously unselected package cuda.
Preparing to unpack .../52-cuda_10.1.105-1_amd64.deb ...
Unpacking cuda (10.1.105-1) ...
Setting up cuda-license-10-1 (10.1.105-1) ...
*** LICENSE AGREEMENT ***
By using this software you agree to fully comply with the terms and 
conditions of the EULA (End User License Agreement). The EULA is located
at /usr/local/cuda-10.1/doc/EULA.txt. The EULA can also be found at
http://docs.nvidia.com/cuda/eula/index.html. If you do not agree to the
terms and conditions of the EULA, do not use the software.

Setting up cuda-cusparse-10-1 (10.1.105-1) ...
Setting up cuda-nvjpeg-10-1 (10.1.105-1) ...
Setting up cuda-nsight-10-1 (10.1.105-1) ...
Setting up cuda-nvdisasm-10-1 (10.1.105-1) ...
Setting up cuda-nvml-dev-10-1 (10.1.105-1) ...
Setting up cuda-sanitizer-api-10-1 (10.1.105-1) ...
Setting up cuda-nvjpeg-dev-10-1 (10.1.105-1) ...
Setting up cuda-drivers (418.39-1) ...
Setting up cuda-cufft-10-1 (10.1.105-1) ...
Setting up cuda-nvprof-10-1 (10.1.105-1) ...
Setting up cuda-nvrtc-10-1 (10.1.105-1) ...
Setting up libcublas10 (10.1.0.105-1) ...
Setting up libcublas-dev (10.1.0.105-1) ...
Setting up cuda-npp-10-1 (10.1.105-1) ...
Setting up cuda-cufft-dev-10-1 (10.1.105-1) ...
Setting up cuda-nvvp-10-1 (10.1.105-1) ...
Setting up cuda-driver-dev-10-1 (10.1.105-1) ...
Setting up cuda-cuobjdump-10-1 (10.1.105-1) ...
Setting up cuda-nsight-systems-10-1 (10.1.105-1) ...
Setting up cuda-gdb-10-1 (10.1.105-1) ...
Setting up cuda-nsight-compute-10-1 (10.1.105-1) ...
Setting up cuda-cudart-10-1 (10.1.105-1) ...
Setting up cuda-npp-dev-10-1 (10.1.105-1) ...
Setting up cuda-cusolver-10-1 (10.1.105-1) ...
Setting up cuda-misc-headers-10-1 (10.1.105-1) ...
Setting up cuda-nvtx-10-1 (10.1.105-1) ...
Setting up cuda-curand-10-1 (10.1.105-1) ...
Setting up cuda-cusparse-dev-10-1 (10.1.105-1) ...
Setting up cuda-gpu-library-advisor-10-1 (10.1.105-1) ...
Setting up cuda-nvgraph-10-1 (10.1.105-1) ...
Setting up cuda-nvprune-10-1 (10.1.105-1) ...
Setting up cuda-memcheck-10-1 (10.1.105-1) ...
Setting up cuda-cudart-dev-10-1 (10.1.105-1) ...
Setting up cuda-nvrtc-dev-10-1 (10.1.105-1) ...
Setting up cuda-curand-dev-10-1 (10.1.105-1) ...
Setting up cuda-cusolver-dev-10-1 (10.1.105-1) ...
Setting up cuda-nvgraph-dev-10-1 (10.1.105-1) ...
Setting up cuda-libraries-10-1 (10.1.105-1) ...
Setting up cuda-nvcc-10-1 (10.1.105-1) ...
Setting up cuda-runtime-10-1 (10.1.105-1) ...
Setting up cuda-compiler-10-1 (10.1.105-1) ...
Setting up cuda-demo-suite-10-1 (10.1.105-1) ...
Setting up cuda-visual-tools-10-1 (10.1.105-1) ...
Setting up cuda-libraries-dev-10-1 (10.1.105-1) ...
Setting up cuda-samples-10-1 (10.1.105-1) ...
Setting up cuda-cupti-10-1 (10.1.105-1) ...
Setting up cuda-documentation-10-1 (10.1.105-1) ...
Setting up cuda-command-line-tools-10-1 (10.1.105-1) ...
Setting up cuda-tools-10-1 (10.1.105-1) ...
Setting up cuda-toolkit-10-1 (10.1.105-1) ...
Setting up cuda-10-1 (10.1.105-1) ...
Setting up cuda (10.1.105-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

BUT

nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
nvcc

Command 'nvcc' not found, but can be installed with:

sudo apt install nvidia-cuda-toolkit
sudo apt install nvidia-cuda-toolkit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1 libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1
  libnppc9.1 libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1 libnppif9.1 libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1
  libnppitc9.1 libnpps9.1 libnvblas9.1 libnvgraph9.1 libnvrtc9.1 libnvtoolsext1 libnvvm3 libthrust-dev libvdpau-dev nvidia-cuda-dev
  nvidia-cuda-doc nvidia-cuda-gdb nvidia-opencl-dev nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev opencl-c-headers
Suggested packages:
  libvdpau-doc libcupti-dev nvidia-driver libpoclu-dev
Recommended packages:
  libnvcuvid1
The following NEW packages will be installed:
  libaccinj64-9.1 libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1 libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1
  libnppc9.1 libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1 libnppif9.1 libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1
  libnppitc9.1 libnpps9.1 libnvblas9.1 libnvgraph9.1 libnvrtc9.1 libnvtoolsext1 libnvvm3 libthrust-dev libvdpau-dev nvidia-cuda-dev
  nvidia-cuda-doc nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-opencl-dev nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev
  opencl-c-headers
0 upgraded, 37 newly installed, 0 to remove and 0 not upgraded.
Need to get 772 MB of archives.
After this operation, 1,774 MB of additional disk space will be used.
Do you want to continue? [Y/n]

it points to 9.1 again
Moreover, what makse the matters worse is

sudo apt purge cuda*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package cuda_10.0.130_410.48_linux.run
E: Couldn't find any package by glob 'cuda_10.0.130_410.48_linux.run'
E: Couldn't find any package by regex 'cuda_10.0.130_410.48_linux.run'
E: Unable to locate package cuda_10.1.105_418.39_linux.run
E: Couldn't find any package by glob 'cuda_10.1.105_418.39_linux.run'
E: Couldn't find any package by regex 'cuda_10.1.105_418.39_linux.run'
E: Unable to locate package cuda_cluster_pkgs_10.1.105_418.39_ubuntu1804.tar.gz
E: Couldn't find any package by glob 'cuda_cluster_pkgs_10.1.105_418.39_ubuntu1804.tar.gz'
E: Couldn't find any package by regex 'cuda_cluster_pkgs_10.1.105_418.39_ubuntu1804.tar.gz'
E: Unable to locate package cuda_cluster_pkgs_ubuntu1804
E: Unable to locate package cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
E: Couldn't find any package by glob 'cuda-repo-ubuntu1604_9.1.85-1_amd64.deb'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1604_9.1.85-1_amd64.deb'
E: Unable to locate package cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804_10.0.130-1_amd64.deb'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804_10.0.130-1_amd64.deb'
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb'
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.1
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.1'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.1'
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.2
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.2'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.2'
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.3
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.3'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.3'
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.4
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.4'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.4'
E: Unable to locate package cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb
E: Couldn't find any package by glob 'cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb'
E: Couldn't find any package by regex 'cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb'
cat /var/lib/apt/lists/*cuda*Packages | grep "Package:" 
Package: cuda-cufft-dev-10-1
Package: cuda-cusparse-dev-10-1
Package: cuda-core-10-1
Package: cuda-tools-10-1
Package: xserver-xorg-video-nvidia-418
Package: cuda-compat-10-1
Package: cuda-minimal-build-10-1
Package: libnvidia-gl-418
Package: nvidia-driver-418
Package: cuda-misc-headers-10-1
Package: libcublas10
Package: libnvidia-compute-418
Package: cuda-drivers
Package: libnvidia-encode-418
Package: cuda-libraries-dev-10-1
Package: libnvidia-fbc1-418
Package: cuda-nvgraph-dev-10-1
Package: cuda-nvjpeg-10-1
Package: cuda-samples-10-1
Package: cuda-nvtx-10-1
Package: libnvidia-decode-418
Package: cuda-license-10-1
Package: cuda-nvrtc-dev-10-1
Package: cuda-nvvp-10-1
Package: libnvidia-ifr1-418
Package: cuda-sanitizer-api-10-1
Package: nvidia-headless-no-dkms-418
Package: cuda-documentation-10-1
Package: cuda-npp-10-1
Package: libnvidia-cfg1-418
Package: cuda-visual-tools-10-1
Package: nvidia-384
Package: cuda-nvrtc-10-1
Package: cuda-nvprof-10-1
Package: cuda-nsight-10-1
Package: cuda-nvjpeg-dev-10-1
Package: libxnvctrl-dev
Package: cuda-command-line-tools-10-1
Package: nvidia-compute-utils-418
Package: cuda-gdb-10-1
Package: nvidia-dkms-418
Package: libnvidia-common-418
Package: cuda-cupti-10-1
Package: nvidia-libopencl1-384
Package: cuda-nvdisasm-10-1
Package: cuda-demo-suite-10-1
Package: cuda-nvprune-10-1
Package: cuda-npp-dev-10-1
Package: nvidia-opencl-icd-384
Package: libxnvctrl0
Package: cuda-cufft-10-1
Package: cuda-runtime-10-1
Package: cuda-cusolver-dev-10-1
Package: cuda-gpu-library-advisor-10-1
Package: nvidia-kernel-source-418
Package: cuda-10-1
Package: nvidia-headless-418
Package: nvidia-kernel-common-418
Package: cuda-memcheck-10-1
Package: cuda-gdb-src-10-1
Package: cuda-curand-10-1
Package: cuda-driver-dev-10-1
Package: nvidia-utils-418
Package: cuda-nsight-systems-10-1
Package: cuda-cudart-dev-10-1
Package: nvidia-settings
Package: nvidia-384-dev
Package: cuda-toolkit-10-1
Package: nvidia-modprobe
Package: cuda-compiler-10-1
Package: cuda
Package: libcuda1-384
Package: cuda-nvcc-10-1
Package: cuda-curand-dev-10-1
Package: cuda-nvml-dev-10-1
Package: cuda-cusolver-10-1
Package: cuda-nsight-compute-10-1
Package: libcublas-dev
Package: cuda-cudart-10-1
Package: cuda-nvgraph-10-1
Package: cuda-libraries-10-1
Package: cuda-cuobjdump-10-1
Package: cuda-cusparse-10-1
sudo apt-get install cuda-drivers  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cuda-drivers is already the newest version (418.39-1).
cuda-drivers set to manually installed.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
[nvcc

Command 'nvcc' not found, but can be installed with:

sudo apt install nvidia-cuda-toolkit

How to get it all purged and installed all the coherent versions?
how to get the toolkit from 10.1 and not from 9,1? and the mess with driver-nvidia-smi - is it resolvable [soluble]?

It seems that I can not even purge it completely:

[code][sudo apt purge cuda*
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package cuda_10.0.130_410.48_linux.run
E: Couldn’t find any package by glob ‘cuda_10.0.130_410.48_linux.run’
E: Couldn’t find any package by regex ‘cuda_10.0.130_410.48_linux.run’
E: Unable to locate package cuda_10.1.105_418.39_linux.run
E: Couldn’t find any package by glob ‘cuda_10.1.105_418.39_linux.run’
E: Couldn’t find any package by regex ‘cuda_10.1.105_418.39_linux.run’
E: Unable to locate package cuda_cluster_pkgs_10.1.105_418.39_ubuntu1804.tar.gz
E: Couldn’t find any package by glob ‘cuda_cluster_pkgs_10.1.105_418.39_ubuntu1804.tar.gz’
E: Couldn’t find any package by regex ‘cuda_cluster_pkgs_10.1.105_418.39_ubuntu1804.tar.gz’
E: Unable to locate package cuda_cluster_pkgs_ubuntu1804
E: Unable to locate package cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1604_9.1.85-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1604_9.1.85-1_amd64.deb’
E: Unable to locate package cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804_10.0.130-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804_10.0.130-1_amd64.deb’
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb’
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.1
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.1’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.1’
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.2
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.2’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.2’
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.3
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.3’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.3’
E: Unable to locate package cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.4
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.4’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804_10.1.105-1_amd64.deb.4’
E: Unable to locate package cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1804-10-1-local-10.1.105-418.39_1.0-1_amd64.deb’
/code]

after reboot it purges:
after sequential installation with network debian method it installs the driver
then I do export paths

export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}}

and it finally recognizes nvcc version and driver loaded as installed and running, but nvidia-smi still shows mismatch:

cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  418.39  Sat Feb  9 19:19:37 CST 2019
GCC version:  gcc version 6.5.0 20181026 (Ubuntu 6.5.0-2ubuntu1~18.04)
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105
nvidia-smi
Failed to initialize NVML: Driver/library version mismatch
./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Well why are you keep installing “Nvidia-cuda-toolkit”? It is a package from Ubuntu’s repository, not Nvidia’s cuda repo you installed from the .deb you downloaded from Nvidia, and it is not the right version (cuda9, see the outputs) You are having a lot of conflicting cuda stuffs. I think you’ll have to uninstall, purge them all and start all over again. Also get the network, not local .deb from Nvidia.

P.S your failed runfile installation might have thrown out a bunch of stuffs in your file system as well. Locate and delete all the debris manually (apt can’t help here)

P.P.S Instead of running those sudo apt install commands and get the package name wrong or the version wrong and not having any description of the package, I highly recommend synaptic, a gui package manager which lets you search easily and shows you a lot more info (you can find those info with apt command but my experience is that most ppl who copy and paste sudo apt install XXX usually don’t know how)

Thank you for the hint.
What am I doing is the below:
1.

sudo add-apt-repository --remove ppa:graphics-drivers/ppa
sudo apt purge *nvidia* *cuda*
  1. reboot
  2. Install from network deb
`sudo dpkg -i cuda-repo-ubuntu1804_10.1.105-1_amd64.deb`
`sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub`
`sudo apt-get update`
`sudo apt-get install cuda`
  1. Restarting
    6.Testing
nvidia-smi
Sun Mar 17 06:09:41 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.39       Driver Version: 418.39       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  TITAN Xp            On   | 00000000:04:00.0 Off |                  N/A |
| 25%   46C    P0    61W / 250W |     36MiB / 12194MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1679      G   /usr/lib/xorg/Xorg                            22MiB |
|    0      1847      G   /usr/bin/gnome-shell                          11MiB |
+-----------------------------------------------------------------------------+

Testing

nvcc -V

Command 'nvcc' not found, but can be installed with:

sudo apt install nvidia-cuda-toolkit

Adjusting:

export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}}

Adjusting

export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Testing:

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105

Building samples:

cd ~/NVIDIA_CUDA-10.1_Samples
make -j16

Testing samples:

./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "TITAN Xp"
  CUDA Driver Version / Runtime Version          10.1 / 10.1
  CUDA Capability Major/Minor version number:    6.1
  Total amount of global memory:                 12195 MBytes (12787122176 bytes)
  (30) Multiprocessors, (128) CUDA Cores/MP:     3840 CUDA Cores
  GPU Max Clock rate:                            1582 MHz (1.58 GHz)
  Memory Clock rate:                             5705 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 3145728 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 4 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.1, CUDA Runtime Version = 10.1, NumDevs = 1
Result = PASS

DONE, but why paths are not autoadjusted?

sudo apt install nvidia-cuda-toolkit

That is the wrong package as explained above.

My suggestion is that in a clean system (remove all cuda stuffs) install instead of cuda which is a meta package which pulls in cuda-10.1

sudo apt install cuda-10-0

(or earlier such as)

sudo apt install cuda-9-2

cuda-10.1 breaks multiple systems and is unsupported by programs such as tensorflow (a lot of people use cuda for) There are many versions of cuda available from Nvidia’s cuda repo (the network .deb file that you installed)

If you have synaptic you can see which versions Nvidia provides at a glance.

No, I am not using “sudo apt install nvidia-cuda-toolkit”
that is what is returned on execution of nvcc -V, unless I export the path.
But once I export the path - everything works with 10.1 as far as I can see and examples run as is demonstrated above.
I tested 10.0 it installs fine.
Thank you for your help. The issue has been resolved.