Perpetual login loop (CUDA installation)

Hi, I’m new to Linux, so I’m having a hard time installing CUDA and Nvidia drivers correctly.

I have an older graphic card at the moment, GeoForce GTX 260.

I had installed these drivers:

------------------------------------------------------+
| NVIDIA-SMI 340.104 Driver Version: 340.104 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 260 Off | 0000:01:00.0 N/A | N/A |
| 40% 46C P12 N/A / N/A | 226MiB / 895MiB | N/A Default |
±------------------------------±---------------------±---------------------+

+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |

I had CUDA installed but I was missing a file libcuda.so.1

So when trying to run Keras I was getting an import error:

libcuda.so.1

If I ran:

nvcc --version
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

It would show CUDA is installed (I’m assuming).

So I asked here and reddit as to how to solve the missing file problem (I got no response here so I followed the directions on reddit, and I was told to install:

libcuda1-340

which I did.

But after restarting the computer, I’m getting a perpetual login loop.

Now If I run nvidia-bug-report from the tty1 console:

I get something like:

modprobe:libkmod/libkmod-module"c:832 kmod_module Error could not find module by name = ‘Nvidia_340’
modprobe: Error could not insert ‘nvidia-340’ Unknown Symbol
modprobe: Error could not find module by name = ‘Nvidia_340’
modprobe: Error could not insert ‘nvidia-340’
Complete: