cuda install failed: ERROR: Unable to load the kernel module 'nvidia.ko'.

ERROR: Unable to load the kernel module ‘nvidia.ko’. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

Please see the log entries ‘Kernel module load error’ and ‘Kernel messages’ at the end of the file ‘/var/log/nvidia-installer.log’ for more information.
→ Kernel module load error: No such device
→ Kernel messages:
[ 13.893238] tg3 0000:01:00.0 eno1: Flow control is on for TX and on for RX
[ 13.893243] tg3 0000:01:00.0 eno1: EEE is disabled
[ 13.893283] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
[ 13.893388] br0: port 1(eno1) entered forwarding state
[ 13.893402] br0: port 1(eno1) entered forwarding state
[ 13.893468] IPv6: ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
[ 17.524007] aufs 4.x-rcN-20160111
[ 19.083200] Bridge firewalling registered
[ 19.129214] nf_conntrack version 0.5.0 (65536 buckets, 262144 max)
[ 19.303806] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 19.452936] Initializing XFRM netlink socket
[ 19.462847] Netfilter messages via NETLINK v0.30.
[ 19.472956] ctnetlink v0.93: registering with nfnetlink.
[ 19.577540] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready
[ 19.809637] aufs au_opts_verify:1597:dockerd[2483]: dirperm1 breaks the protection by the permission bits on the lower branch
[ 28.903399] br0: port 1(eno1) entered forwarding state
[ 187.380035] [drm] Initialized drm 1.1.0 20060810
[ 187.456104] nvidia: module license ‘NVIDIA’ taints kernel.
[ 187.456110] Disabling lock debugging due to kernel taint
[ 187.461840] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 187.468497] NVRM: No NVIDIA graphics adapter found!
[ 691.269945] [drm] Initialized drm 1.1.0 20060810
[ 691.312619] nvidia-nvlink: Nvlink Core is being initialized, major device number 241
[ 691.312850] NVRM: No NVIDIA graphics adapter found!
[ 691.312925] nvidia-nvlink: Unregistered the Nvlink Core, major device number 241
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

ubuntu 16.04

root@ubuntu:/home/ubuntu# lspci |grep VGA
0c:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2

So you don’t have a NVIDIA GPU in that machine (Matrox is not NVIDIA).

That is why you are getting this message:

No NVIDIA graphics adapter found!

If you don’t have an NVIDIA GPU, you won’t be able to load the NVIDIA driver, nor will you be able to run any CUDA codes. CUDA install will also fail if you attempt to install the NVIDIA driver with the CUDA toolkit.