Nvidia-smi gives "No devies were found" - incorrect gcc version

It does!!

nvidia/535.161.07, 6.5.0-25-generic, x86_64: installed

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

Please run
sudo modprobe nvidia
and post any errors.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

sudo modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': No such device

nvidia-bug-report.log.gz (124.6 KB)

nouveau is still loaded. Please reboot.

No output from sudo modprobe nvidia

nvidia-bug-report.log.gz (696.8 KB)

Edit: It worked!! nvidia-smigives the exprected output, thank you so much