Cuda 7.5 installation error on ubuntu 14.04

I am new to Ubuntu, so sorry for any naive question.

I am trying to install cuda-7.5 on my GPU server machine. Before installation, I removed all cuda and nvidia drivers using:

sudo apt-get remove --purge nvidia-*
sudo apt-get remove nvidia-cuda-toolkit
sudo apt-get remove --auto-remove nvidia-cuda-toolkit
sudo nvidia-uninstall

Then, I followed following guidelines to install cuda-7.5:

Confirmation of the environment –

lspci | grep -i nvidia (Confirm that the information of NVIDIA's board is displayed)
uname -m (make sure that it is a x86_64)
gcc --version (make sure it is installed)

Installation of CUDA –

Downloaded cuda_7.5.18_linux.run file from https://developer.nvidia.com/cuda-downloads and ran the following command –

sudo apt-get install build-essential

sudo vi /etc/modprobe.d/blacklist-nouveau.conf

Then, add the following line in that file: blacklist nouveau option nouveau modeset=0

sudo update-initramfs -u

Rebooted server using init 6

And, installed cuda using

chmod a+x cuda-7.5.18_linux.run
sudo service lightdm stop
sudo bash cuda-7.5.18_linux.run --no-opengl-libs

During the install –

a. Accepted EULA conditions

b. YES to installing the NVIDIA driver

c. YES to installing CUDA Toolkit + Driver

d. YES to installing CUDA Samples
After installation, I checked following things:

cd /dev (contains nvidiactl and nvidia0 files)
Set Environment path variables –

export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

Then,

nvidia-smi (show driver is running with verion 352.39)

Verified the driver version –

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.39 Fri Aug 14 18:09:10 PDT 2015 GCC version: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
Verified cuda version

nvcc -V

nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
Switch the lightdm back on again

sudo service lightdm start

Create CUDA Samples –

a. Go to NVIDIA_CUDA-7.5_Samples folder through terminal
b. make
c. cd bin/x86_64/linux/release/

Now when I run ./devideQuery, I get following errors:

./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

modprobe: ERROR: …/libkmod/libkmod-module.c:809 kmod_module_insert_module() could not find module by name='nvidia_367_uvm’

modprobe: ERROR: could not insert ‘nvidia_367_uvm’: Function not implemented
cudaGetDeviceCount returned 30

-> unknown error
Result = FAIL

I am not able to understand why modeprobe is looking for nvidia_367_uvm as I have installed nvidia 352.39 driver.

Please help me to solve this problem. To me it seems like there is some earlier instance of nvidia 367 that is causing the problem. Any help please!!

Indeed, you still have items left around from previous installs. You’ll need to remove these. An r367 driver may be installed as a result of a previous attempt to install CUDA 8, and you have not correctly attempted to remove CUDA 8, if you installed it via apt-get install cuda

Follow the instructions in the linux install guide.

If you’re still having trouble, you could try starting over with a clean install of ubuntu 14.04

Thanks for your reply.

I did had my concerns regarding left around items. I did try

sudo apt-get remove

But it did not solve my problem.

The problem is, I can not doo a fresh install of ubuntu on this server machine (restrictions from my company). Is there a way to master clean all previous instances?

Thanks!

It’s possible that the 367 uvm component(s) was installed by runfile installer. In that case sudo apt-get won’t be able to remove them.

You should read the linux install guide concerning “handle conflicting install methods”