# error: cannot find -lcuda

**URL:** <https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060>\
**Category:** CUDA Programming and Performance\
**Created:** [October 24, 2008, 1:55pm UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060 "2008-10-24T13:55:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucas\_shao](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lucas\_shao](https://forums.developer.nvidia.com/u/lucas_shao)\
**Post date:** [October 24, 2008, 1:55pm UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/1 "2008-10-24T13:55:34Z")

</div>

I have installed cuda on Fedora 8

Because I have no NV video card ,so I have not installed the driver

After I have installed the Toolkit and SDK successfully, I type “make emu=1 dbg=1”

But the result is :/usr/bin/ld:cannot find -lcuda, Why?  
(I find there is no libcuda.so in the /usr/local/cuda/lib,  
just becase I have not installed the driver?)

please help me , thanks in advance!

---

<div class="post-metadata">

**Author:** ![Mafos](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Mafos](https://forums.developer.nvidia.com/u/Mafos)\
**Post date:** [October 27, 2008, 6:55pm UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/2 "2008-10-27T18:55:42Z")

</div>

Did you run ‘make’ in main SDK directory? In your case, that would be ‘make emu=1 dbg=1’.

---

<div class="post-metadata">

**Author:** ![lucas\_shao](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lucas\_shao](https://forums.developer.nvidia.com/u/lucas_shao)\
**Post date:** [October 28, 2008, 3:00am UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/3 "2008-10-28T03:00:27Z")

</div>

> [@](#):
>
> Did you run ‘make’ in main SDK directory? In your case, that would be ‘make emu=1 dbg=1’.

yes ,I have gone to the main SDK directory, and then type “make emu=1 dbg=1”. then the error is coming

---

<div class="post-metadata">

**Author:** ![kneves](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kneves](https://forums.developer.nvidia.com/u/kneves)\
**Post date:** [November 20, 2008, 1:00am UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/4 "2008-11-20T01:00:57Z")

</div>

I’m having then same problem.

I dont have a NV video card too and i cant to make the projetcs… :(

---

<div class="post-metadata">

**Author:** ![AndyLee](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@AndyLee](https://forums.developer.nvidia.com/u/AndyLee)\
**Post date:** [November 20, 2008, 9:26am UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/5 "2008-11-20T09:26:23Z")

</div>

1.go to main SDK directory( not one of the project directory )

2.type “make emu=1” firstly

have a try~

> [@](#):
>
> I have installed cuda on Fedora 8
> 
> Because I have no NV video card ,so I have not installed the driver
> 
> After I have installed the Toolkit and SDK successfully, I type “make emu=1 dbg=1”
> 
> But the result is :/usr/bin/ld:cannot find -lcuda, Why?
> 
> (I find there is no libcuda.so in the /usr/local/cuda/lib,
> 
> just becase I have not installed the driver?)
> 
> please help me , thanks in advance!

---

<div class="post-metadata">

**Author:** ![MisterAnderson42](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@MisterAnderson42](https://forums.developer.nvidia.com/u/MisterAnderson42)\
**Post date:** [November 20, 2008, 1:40pm UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/6 "2008-11-20T13:40:14Z")

</div>

Some of the SDK examples are written with the driver API and have no emulation mode. These are likely the ones causing the problem. Try building just the projects you want to try in emulation mode and they should work.

---

<div class="post-metadata">

**Author:** ![kneves](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kneves](https://forums.developer.nvidia.com/u/kneves)\
**Post date:** [November 22, 2008, 1:06am UTC](https://forums.developer.nvidia.com/t/error-cannot-find-lcuda/6060/7 "2008-11-22T01:06:58Z")

</div>

Hi Lucas,

I solved my problem…

1. Get the NVIDIA Driver for Linux with CUDA Support from NVIDIAs CUDA Zone.
2. Extract the .run, on terminal: $ sh ./NVIDIA-Linux-x86-177.73-pkg1.run --extract-only ./  
The name of the file can change.
3. Copy the _.so files of the driver packages to the other CUDA libraries (/usr/local/cuda/lib).  
Like: $ sudo cp ./NVIDIA-Linux-x86-177.73-pkg1/lib/_.\* /usr/local/cuda/lib/
4. Add a symbolic link:  
$ cd /usr/local/cuda/lib/  
$ â€™sudo ln -s libcuda.so.177.73 libcuda.soâ€™  
(In my case the lib is named â€œlibcuda.so.177.73â€³. It my be different on your system.)
5. Go to the SDK directory and run make with emulation option enabled:  
â€˜make emu=1â€² or â€˜make emu=1 dbg=1â€² for debug mode

I compiled every ok. But, when I try to run anything, I get it:  
error while loading shared libraries: libcudart.so.2: cannot open shared object file: No such file or directory

:(
