Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcudart.so.8.0: cannot open shared object file: No such file or directory #4944

Closed
ghost opened this issue Nov 2, 2016 · 11 comments
Closed

Comments

@ghost
Copy link

@ghost ghost commented Nov 2, 2016

.......
[==========] 2081 tests from 277 test cases ran. (324463 ms total)
[ PASSED ] 2081 tests.

i have make runtest,as it is showed above,the runtest have passed.But when i try to run mnist example,the error happened as below:

``:~/caffe$ sudo sh ./examples/mnist/create_mnist.sh
Creating lmdb...
build/examples/mnist/convert_mnist_data.bin: error while loading shared libraries: libcudart.so.8.0: cannot open shared object file: No such file or directory

many people said i should add the path in the bashrc document,and i have added as below:

export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-8.0/bin:$PATH
export PATH

but i try again,the error happened again.i do not know what i did wrong,if anyone know,please tell me what i should do,thanks in advance.

@ghost ghost closed this Nov 3, 2016
@Shubhamcl
Copy link

@Shubhamcl Shubhamcl commented Mar 10, 2017

Hard to understand why is this one closed ? the issue still exists.

.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory
Makefile:533: recipe for target 'runtest' failed
make: *** [runtest] Error 127
@Edwardmark
Copy link

@Edwardmark Edwardmark commented May 14, 2017

I met the same error, please help me

@zhenni
Copy link

@zhenni zhenni commented May 23, 2017

@Edwardmark

As @fujihuang mentioned, just add the path
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-8.0/bin:$PATH

However, fujihuang adds the third comment which makes his PATH to be empty.

@martianvenusian
Copy link

@martianvenusian martianvenusian commented Aug 8, 2017

Thank you @zhenni . It helped

@martianvenusian
Copy link

@martianvenusian martianvenusian commented Sep 15, 2017

thank you @zhenni. You saved my day

@zimenglan-sysu-512
Copy link

@zimenglan-sysu-512 zimenglan-sysu-512 commented Dec 6, 2017

hi @zhenni,

your solution does not work. do you have other suggestion how to solve it?

@SelenaKong
Copy link

@SelenaKong SelenaKong commented Mar 14, 2018

sudo ldconfig /usr/local/cuda/lib64
Fine for me.
Please refer this link for more information.
tensorflow/tensorflow#5343

@calf1in1cup
Copy link

@calf1in1cup calf1in1cup commented Apr 5, 2018

if the first method mentioned above can't help,maybe you can try this,
go into the dir /usr/local/cuda/include/host_config.h, then comments"#error-- unsupported GNU version! gcc versions later than 4.9 are not supported!"
like this "//#error-- unsupported GNU version! gcc versions later than 4.9 are not supported!"

@sanpreet
Copy link

@sanpreet sanpreet commented Jul 2, 2019

@ghost, I would like to bring some more information to resolve the error as i was also facing the same issue. First of all as zhenni said you need to add the path in the file .bashrc (ubuntu user). For example see the below line I have added in my .bashrc file.

LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Please do add one more point once you added these files in the .bashrc it is important to reflect the changes in the file using the command .bashrc. Now, restart the terminal to see the change. Please run the below command in the terminal

echo $LD_LIBRARY_PATH

You will see the output like this

/usr/local/cuda-10.0/lib64::/usr/local/lib
Once, you are successfully in running these steps successfully, please go to the following path

cd $HOME/cudnn_samples_v7/mnistCUDNN

Please run the below command

make clean && make

This command is very important before running the command ./mnistCUDNN.

You will get the message as shown below

cuddn_error_resolve

Reference to compose this answer
https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#verify

With regards
Sanpreet Singh

@LongruiDong
Copy link

@LongruiDong LongruiDong commented Jan 9, 2020

sudo ldconfig /usr/local/cuda/lib64
Fine for me.
Please refer this link for more information.
tensorflow/tensorflow#5343

works for me!!
Thanks~~

@chovy
Copy link

@chovy chovy commented Jan 25, 2021

how to install on ubuntu 20?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants