Missing Shared Object File: libc10_cuda.so

When I try to exectue a program pytorch c++ program I wrote, I receive the following error:

 error while loading shared libraries: libc10_cuda.so: cannot open shared object file: No such file or directory

I can locate the object on my computer at: /home/fabian/torch_cpp/libtorch/lib/libc10_cuda.so . The cmake-gui also references this file with the options:

C10_CUDA_LIBRARY           /home/fabian/torch_cpp/libtorch/lib/libc10_cuda.so
C10_LIBRARY                /home/fabian/torch_cpp/libtorch/lib/libc10.so

I use a z-shell on Ubuntu 19.10 and I did include /home/fabian/torch_cpp/libtorch/lib/ to my PATH variable. I did download libtorch from https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.5.0%2Bcu101.zip.

Does somebody have any hints or ideas how I can solve the problem? That would be very kind!

@FabianSchuetze
Assuming you followed this instruction here: ‘https://pytorch.org/cppdocs/installing.html
Can you try appending the ‘/home/fabian/torch_cpp/libtorch’ into your CMAKE_PREFIX_PATH?

Thank you, @glaringlee . You helped me solve the problem.