how to find the path for libcudart.so?
Solution 1
Not sure if it is the best way but I had the same issue and this helped.
sudo ln -s /usr/local/cuda/lib64 /usr
Verify the link from /usr
with ls -l lib64
lib64 -> /usr/local/cuda/lib64
Solution 2
It seems that, you have exported wrong path.
So, On terminal type: sudo ldconfig /usr/local/cuda/lib64
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line
If this don't work try: export PATH=$PATH:/usr/local/cuda/bin
This will set environmental path.
Solution 3
If you're using Ubuntu 16.04 or Ubuntu 18.04 and want to get TensorFlow with GPU support installed, there is a deb package for that in the Lambda Stack repository.
You can install the repository and the package with this line:
LAMBDA_REPO=$(mktemp) && \
wget -O${LAMBDA_REPO} https://lambdal.com/static/files/lambda-stack-repo.deb && \
sudo dpkg -i ${LAMBDA_REPO} && rm -f ${LAMBDA_REPO} && \
sudo apt-get update && sudo apt-get install -y lambda-stack-cuda
What it does:
- Download and installs the Lambda Stack Repository (essentially adds a file to /etc/apt/sources.list.d/)
- Updates apt and installs the
lambda-stack-cuda
package. - Installs CUDA, Drivers, CuDNN, and TensorFlow with CuDNN and GPU support into the proper system level directories. You won't need to modify your
LD_LIBRARY_PATH
orPATH
as the shared libraries are placed in directories thatld
already checks at link time.
Related videos on Youtube
iamgr007
by day: a daydreamer By night : a werewolf i love playing music and football.
Updated on September 18, 2022Comments
-
iamgr007 over 1 year
I'm trying to install Tensorflow GPU version and I'm stuck at this. I've installed nvidia-cuda-toolkit by running
sudo apt install nvidia-cuda-toolkit
and it downloaded fine. But i'm unable to locate this libcudart.so
Please specify which gcc nvcc should use as the host compiler. [Default is /usr/bin/gcc]: /usr/bin/gcc Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: Please specify the location where CUDA toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda Invalid path to CUDA toolkit. /usr/local/cuda/lib64/libcudart.so cannot be found
How can I solve this?
-
Admin about 7 years
-
-
Gabriel Fair over 5 yearsThanks, I noticed that Lambda Stack doesn't set the the
LD_LIBRARY_PATH
andCUDA_HOME
environment variables. Any reason why the installer doesn't do this? -
sabalaba over 5 yearsIt’s because we properly place the library .so files in locations where ‘ld’ already looks.
-
Asad-ullah Khan over 4 yearsthis is definitely the right answer. note that the path
/usr/local/cuda
is potentially optional with some nvidia installers, so if you dont have that path, just use/usr/local/cuda-10.0
-
chovy over 3 yearsi don't havef any of these paths