I have been through the same problem, I followed the installation guide in here [url] Installation Guide Linux :: CUDA Toolkit Documentation
launching the command
$ sudo apt-get install cuda
on the extracted deb(local) installer file the process ends up with these lines:
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link
/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link
I tried the solution within this link [url] 16.04 - libEGL.so.1 is not a symbolic link - Ask Ubuntu
I added the cuda 8 bin folder to the PATH variables with respect to [url]Installation Guide Linux :: CUDA Toolkit Documentation
After that the
command does show no nvcc installed with proposing to execute:
$ sudo apt install nvidia-cuda-toolkit
wich I did without purging cuda or nvidia.
and when I launched nvcc --version I get cuda 7.5 installed.
and with entering this command
$ ldconfig -p | grep cuda
it looks that the packages where installed within the cuda 8.0 directories
libnvrtc.so.8.0 (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc.so.8.0
libnvrtc.so (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc.so
libnvrtc-builtins.so.8.0 (libc6,x86-64) => /usr/local/cuda-8.0/targets/x86_64-linux/lib/libnvrtc-builtins.so.8.
After a while I launched $sudo apt-get update
$sudo apt-get upgrade
meanwhile I rebooted my system.
I checked the PATH to my PATH variables, I could not find /usr/local/cuda-8.0/bin
So I added it again.
And launching the nvcc --version I get cuda 8 recognized:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
I do not know why the environment setup did not work at the first place, I were distracted by the symbolic link warning (and not seeing done at the end of the installation process of cuda 8.0 deb local). May be a reboot was needed after the environment setup.
I hope this is not too messy ad it will work fine along the way to learn TensorFlow.
A last thing, there were instructions to install cuda8 but there were not for the accompanying Patch (cublas). So I followed thid link [url]How to complete a dpkg cuBLAS Patch Update to CUDA 8 installation in 16.04? - Ask Ubuntu.