I have already installed cuda-toolkit and cuda-sdk.
The current cuda-driver is: 260.19.06
I didn’t install the newest driver because when I installed it and then reboot there’s no more GUI and if I try to launch the X-Server appears this:
Error: API mismatch: the NVIDIA kernel module has the version 260.19.26, but this X module has the version 260.19.06. Please make sure that the kernel module and all NVIDIA driver components have the same version.
And don’t know how to solve that problem, that’s why I didn’t install the latest driver.
So resuming…
Why I get the error “cannot find -lcuda”? if that problem is attached to the driver version, How can I solve the problem of the X server. I’m really new to linux.
For compiling your own code, you can just add the library to link to as an argument to nvcc:
nvcc -L/usr/lib/nvidia-current/cuda -o myprog myprog.cu -lcuda
However, in this case, your trying to compile the SDK examples which have their own Makefiles. This care somewhat complicated as one Makefile sources some other common ones, etc. I believe what you need to do is add the library path to your /etc/ld.so.conf and run ldconfig. (The install instructions for Linux used to say to add /usr/lib/cuda or /usr/lib64/cuda to ld.so.conf - if the new version has changed the default lib path, you will need to use it instead.)
Hello everyone I just wanted to share my solution to compiling all the samples in cuda folder I am using the latest nvidia driver on fedora 331 with bumblebee for optimus configuration the lcuda library is located in /usr/lib64/nvidia-bumblebee but I suspect the same solution may be valid for nvidia without bumblebee configuration.
Anyway I tried appending to ld.so.conf and running ldconfig but no change was detected but after adding the nvidia-bumblebee library to EXTRA_NVCCFLAGS in the makefile of a sample that previously produced the error the sample compiled so the solution was to edit all the makefiles in order to append -L/usr/lib64/nvidia-bumblebee to EXTRA_NVCCFLAGS.
and then added this regex when asked (^EXTRA_NVCCFLAGS ?=) to replace with (EXTRA_NVCCFLAGS ?= -L/usr/lib64/nvidia-bumblebee) after that everything compiled normally.