everything worked fine but I've just tried to run my CUDA programs on Linux Ubuntu 12.10 in NetBeans and I get error:
dist/Debug/GNU-Linux-x86/my_cuda_1: error while loading shared libraries: libcudart.so.5.0: cannot open shared object file: No such file or directory
RUN FAILED (exit value 127, total time: 191ms)
the projects can build: compile + link without problems, I can also run it from commandline but if I try run it from NetBeans I get this error. I was able to run it few minutes ago, what might happened?
I have added file my_lib to ld.so.conf.d containing such text:
/usr/local/cuda-5.0/lib64:/lib
/usr/lib
/usr/lib64
can it be a link issue libcudart.so.5.0 -> licudart.so? there are two libs in cuda/lib libcudart.so.5.0 (link) and libcudart.so (link) and libcudart.so.5.0.35 (shared lib) why it complains about .so.5.0? mayve link like: sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so is necessary
it is related to link to shared library I think
root@comp:# echo $LD_LIBRARY_PATH /usr/lib/nvidia-current:/usr/local/cuda-5.0/lib::/usr/local/cuda-5.0/lib64:/lib
isn't this :: a problem? seems that No because I changed this and still same error. I specify PATHS, I run ldconfig, I put exports in the .bashrc, still nothing. the reason is that I cannot load these libraries if program is started from NetBeans GUI, however I start NetBeans as root always
add to the Project -> Properties -> Run -> Environment
Name: LD_LIBRARY_PATH
Value: $LD_LIBRARY_PATH:/usr/lib/nvidia-current:/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:/lib
Thank you all. I don't know what happened before as it worked just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With