/usr/bin/ld: cannot find -lcurand

Hi, wonder if anyone ran into the same problem.

I am trying to build darknet on Xavier, but it gave me this error: /usr/bin/ld: cannot find -lcurand. I can find libruand.so.10 file under /usr/local/cuda/lib64/.

Here is what in the Makefile of the darknet, LDFLAGS+= -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand.

Many thanks!

Dear Phil.Chen,
Could you please set LD_LIBRARY_PATH to include path of libcurand and check?

Thank you SivaRamaKrishna!

I tried
export PATH=/usr/local/cuda/bin${PATH:+:{PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PATH=/usr/local/cuda-10.2/bin${PATH:+:{PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}.

It did not solve the problem. Still see /usr/bin/ld: cannot find -lcurand. Any other thoughts to try?

Appreciate your help!