Cuda 9.1 cuda-libraries-9-1 installation Issue

After installing cuda 9.1, cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb. I got error when installing libraries,

~/sw$ sudo apt install cuda-libraries-9-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
cuda-libraries-9-1 is already the newest version (9.1.85-1).
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
cuda-cudart-dev-9-1 : Depends: cuda-driver-dev-9-1 but it is not going to be installed
cuda-libraries-dev-9-1 : Depends: cuda-driver-dev-9-1 (>= 9.1.85) but it is not going to be installed
cuda-samples-9-1 : Depends: cuda-driver-dev-9-1 but it is not going to be installed
cuda-toolkit-9-1 : Depends: cuda-nvml-dev-9-1 (>= 9.1.85) but it is not going to be installed
cuda-visual-tools-9-1 : Depends: cuda-driver-dev-9-1 but it is not going to be installed
Depends: cuda-nvml-dev-9-1 but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
~/sw$

I ran ‘apt-get -f install’ and got similar “Unmet dependencies” errors.

Then I tried to remove Cuda 9.1 and got similar errors, again.
~/sw$ sudo apt-get autoremove --purge cuda
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
cuda-cudart-dev-9-1 : Depends: cuda-driver-dev-9-1 but it is not going to be installed
cuda-libraries-dev-9-1 : Depends: cuda-driver-dev-9-1 (>= 9.1.85) but it is not going to be installed
cuda-samples-9-1 : Depends: cuda-driver-dev-9-1 but it is not going to be installed
cuda-toolkit-9-1 : Depends: cuda-nvml-dev-9-1 (>= 9.1.85) but it is not going to be installed
cuda-visual-tools-9-1 : Depends: cuda-driver-dev-9-1 but it is not going to be installed
Depends: cuda-nvml-dev-9-1 but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
~/sw$

could anyone help me before I have to reinstall Ubuntu?

thanks!
Steve

If you have followed the instructions to install cuda, and done so successfully, you should not need to install the libraries separately.

Generally, the issues you are having now appear to be due to not installing the GPU driver, or the CUDA driver. Both of these would be installed if you install cuda properly, first.