Error cannot load shared file libcudart.so.3 where is libcudart.so.3
A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.

He then tried to run on of the programs and got the following response.

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes
./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul
bash: ./MatrixMul: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul
./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#


Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.

I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.

Where is this file libcudart.so.3?

Is that the error here?


Newport_j
A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.



He then tried to run on of the programs and got the following response.



root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes

./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul

bash: ./MatrixMul: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul

./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#





Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.



I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.



Where is this file libcudart.so.3?



Is that the error here?





Newport_j

#1
Posted 05/06/2010 02:41 PM   
libcudart.so is the cuda runtime library. It will be wherever the CUDA 3.0 toolkit is installed, in either lib or lib64 depending on the architecture.

This is one time when setting LD_LIBRARY_PATH to something appropriate would actually help solve your problems.
libcudart.so is the cuda runtime library. It will be wherever the CUDA 3.0 toolkit is installed, in either lib or lib64 depending on the architecture.



This is one time when setting LD_LIBRARY_PATH to something appropriate would actually help solve your problems.

#2
Posted 05/06/2010 02:52 PM   
[quote name='newport_j' post='1051364' date='May 6 2010, 10:41 AM']A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.

He then tried to run on of the programs and got the following response.

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes
./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul
bash: ./MatrixMul: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul
./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#


Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.

I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.

Where is this file libcudart.so.3?

Is that the error here?


Newport_j[/quote]



I belieive that I can answer my own question.

libcudart.so.3 resides in


libcudart.so.3
/usr/local/cuda/lib/

A echo LD_LIBRARY_PATH revealed nothing - no path at all.

So it is not finding that library file because the LD_LIBARY_PATH is showing no path at all.

I guess that I should modify the question as to why the LD_LIBRARY_PATH change from /usr/local/cuda/lib/ to nothing.

When the system boots up it usually has this path correct, but now...

What happened to the path?

Newport_j
[quote name='newport_j' post='1051364' date='May 6 2010, 10:41 AM']A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.



He then tried to run on of the programs and got the following response.



root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes

./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul

bash: ./MatrixMul: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul

./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#





Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.



I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.



Where is this file libcudart.so.3?



Is that the error here?





Newport_j







I belieive that I can answer my own question.



libcudart.so.3 resides in





libcudart.so.3

/usr/local/cuda/lib/



A echo LD_LIBRARY_PATH revealed nothing - no path at all.



So it is not finding that library file because the LD_LIBARY_PATH is showing no path at all.



I guess that I should modify the question as to why the LD_LIBRARY_PATH change from /usr/local/cuda/lib/ to nothing.



When the system boots up it usually has this path correct, but now...



What happened to the path?



Newport_j

#3
Posted 05/06/2010 02:57 PM   
It is an environment variable and environment variables aren't permanent. They have the life of the shell they are defined in. If you don't do something to set it every time a new shell starts (like put it in your .bashrc file for example), it will never be set.
It is an environment variable and environment variables aren't permanent. They have the life of the shell they are defined in. If you don't do something to set it every time a new shell starts (like put it in your .bashrc file for example), it will never be set.

#4
Posted 05/06/2010 03:03 PM   
[quote name='avidday' post='1051384' date='May 6 2010, 11:03 AM']It is an environment variable and environment variables aren't permanent. They have the life of the shell they are defined in. If you don't do something to set it every time a new shell starts (like put it in your .bashrc file for example), it will never be set.[/quote]


We got the LD_LIBRARY_PATH path back, when he rebooted. Doesn't that mean that it is set in the .bashrc file?


Newport_j
[quote name='avidday' post='1051384' date='May 6 2010, 11:03 AM']It is an environment variable and environment variables aren't permanent. They have the life of the shell they are defined in. If you don't do something to set it every time a new shell starts (like put it in your .bashrc file for example), it will never be set.





We got the LD_LIBRARY_PATH path back, when he rebooted. Doesn't that mean that it is set in the .bashrc file?





Newport_j

#5
Posted 05/06/2010 06:45 PM   
Possibly. Why don't you just look in the file and see?
Possibly. Why don't you just look in the file and see?

#6
Posted 05/06/2010 06:50 PM   
[quote name='newport_j' post='1051364' date='May 6 2010, 06:41 AM']A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.

He then tried to run on of the programs and got the following response.

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes
./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul
bash: ./MatrixMul: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul
./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#


Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.

I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.

Where is this file libcudart.so.3?

Is that the error here?


Newport_j[/quote]


I'm having the same problem. Have you made any progress?
[quote name='newport_j' post='1051364' date='May 6 2010, 06:41 AM']A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.



He then tried to run on of the programs and got the following response.



root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes

./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul

bash: ./MatrixMul: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul

./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#





Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.



I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.



Where is this file libcudart.so.3?



Is that the error here?





Newport_j





I'm having the same problem. Have you made any progress?

#7
Posted 05/25/2010 02:15 PM   
[quote name='newport_j' post='1051364' date='May 6 2010, 06:41 AM']A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.

He then tried to run on of the programs and got the following response.

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes
./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul
bash: ./MatrixMul: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul
./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory
root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#


Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.

I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.

Where is this file libcudart.so.3?

Is that the error here?


Newport_j[/quote]


I'm having the same problem. Have you made any progress?
[quote name='newport_j' post='1051364' date='May 6 2010, 06:41 AM']A work colleague of mine used make to rebuild and link all of the example file in the CUDA 3.0 SDK. I assume it went or without incident.



He then tried to run on of the programs and got the following response.



root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./BlackScholes

./BlackScholes: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./MatrixMul

bash: ./MatrixMul: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release# ./matrixMul

./matrixMul: error while loading shared libraries: libcudart.so.3: cannot open shared object file: No such file or directory

root@fermi:/home/errol/NVIDIA_GPU_Computing_SDK/C/bin/linux/release#





Now I know how to do this by command line, I am still learning using makefile. I can run make and when I last did it a few weeks ago, everything was fine.



I am not sure what is going on, but it seems not to be able to access libcudart.so.3. I cannot easily find it on my remote access. I am guessing the path has changed - hence no libcudart.so.3 is found.



Where is this file libcudart.so.3?



Is that the error here?





Newport_j





I'm having the same problem. Have you made any progress?

#8
Posted 05/25/2010 02:15 PM   
Hi! I had the same problem. I overcame it by adding in the .bashrc file

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib
for 32bit system, or

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
for 64bit system.


G.
Hi! I had the same problem. I overcame it by adding in the .bashrc file



export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib

for 32bit system, or



export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

for 64bit system.





G.

#9
Posted 05/31/2010 05:37 PM   
[quote name='newport_j' date='06 May 2010 - 01:45 PM' timestamp='1273171549' post='1051522']
We got the LD_LIBRARY_PATH path back, when he rebooted. Doesn't that mean that it is set in the .bashrc file?


Newport_j
[/quote]

~/.bashrc stores bash-related settings. You can add "export LD_LIBRARY_PATH = /pathtoyourlib" to .bashrc, or follow this to set LD_LIBARY_PATH:
[b]1. Set LD_LIBRARY_PATH:[/b]
gksudo gedit /etc/ld.so.conf.d/cuda.conf (creates a new file).

[b]2. Paste into the file: [/b]
/usr/local/cuda/lib64
/usr/local/cuda/lib
Save and quit the editor.

[b]3. Reload LD_LIBRARY_PATH:[/b]
sudo ldconfig

Credit goes to ThomasArildsen@ubuntuforums ([url="http://ubuntuforums.org/showthread.php?t=1625433"]Howto: Install Nvidia CUDA in Ubuntu 10.04[/url])
[quote name='newport_j' date='06 May 2010 - 01:45 PM' timestamp='1273171549' post='1051522']

We got the LD_LIBRARY_PATH path back, when he rebooted. Doesn't that mean that it is set in the .bashrc file?





Newport_j





~/.bashrc stores bash-related settings. You can add "export LD_LIBRARY_PATH = /pathtoyourlib" to .bashrc, or follow this to set LD_LIBARY_PATH:

1. Set LD_LIBRARY_PATH:

gksudo gedit /etc/ld.so.conf.d/cuda.conf (creates a new file).



2. Paste into the file:

/usr/local/cuda/lib64

/usr/local/cuda/lib

Save and quit the editor.



3. Reload LD_LIBRARY_PATH:

sudo ldconfig



Credit goes to ThomasArildsen@ubuntuforums (Howto: Install Nvidia CUDA in Ubuntu 10.04)

#10
Posted 07/20/2011 09:08 PM   
[quote name='avidday' date='06 May 2010 - 08:22 PM' timestamp='1273157565' post='1051375']
libcudart.so is the cuda runtime library. It will be wherever the CUDA 3.0 toolkit is installed, in either lib or lib64 depending on the architecture.

This is one time when setting LD_LIBRARY_PATH to something appropriate would actually help solve your problems.
[/quote]


ohh yes, this was very helpful for me. Thank you. I changed my LD_LIBRARY_PATH from "lib64" to "lib". then it worked. This lib name may be depend on your driver version. You can find out what is it? looking at /usr/local/cuda
thank you
[quote name='avidday' date='06 May 2010 - 08:22 PM' timestamp='1273157565' post='1051375']

libcudart.so is the cuda runtime library. It will be wherever the CUDA 3.0 toolkit is installed, in either lib or lib64 depending on the architecture.



This is one time when setting LD_LIBRARY_PATH to something appropriate would actually help solve your problems.







ohh yes, this was very helpful for me. Thank you. I changed my LD_LIBRARY_PATH from "lib64" to "lib". then it worked. This lib name may be depend on your driver version. You can find out what is it? looking at /usr/local/cuda

thank you

#11
Posted 03/31/2012 02:48 PM   
Scroll To Top