1

I'm totally new to ubuntu, and I have a problem in installing cuDNN. I'm following this guide, and currently in step 3: https://www.learnopencv.com/installing-deep-learning-frameworks-on-ubuntu-with-cuda-support/

I downloaded the cuDNN v6.0 Library for Linux file (was saved to Downloads). Ran this command line:

tar xvf cudnn-8.0-linux-x64-v6.0.tgz

So good so far. Now I have a cuda library - /home/nimrod/Downloads/cuda/. I'm having a problem with this line:

sudo cp -P cuda/lib64/* /usr/local/cuda/lib64/

Edit: I get "cp: target '/usr/local/cuda/lib64/' is not a directory"

No idea what should I type. I tried:

sudo cp -P cuda/lib64/* /nimrod/Downloads/cuda/lib64/

and

sudo cp -P cuda/lib64/* home/nimrod/Downloads/cuda/lib64/

and a few other combinations. What should I do?

Edit: @dessert's suggestion of using mkdir solved the problem with the second line (odd, because I had that library). Now I have a problem with the third line, I get the following: cp: cannot create regular file '/usr/local/cuda/include/': Not a directory

How do I solve that?

0

1 Answer 1

3

You don't need to change a thing in this command, just run all three commands from within the same directory, e.g. /home/nimrod/Downloads in your case. Let's cd to there to be sure:

cd /home/nimrod/Downloads
sudo cp -P cuda/lib64/* /usr/local/cuda/lib64/
sudo cp cuda/include/* /usr/local/cuda/include/

Alternatively you can give the commands the full paths:

sudo cp -P /home/nimrod/Downloads/cuda/lib64/* /usr/local/cuda/lib64/
sudo cp /home/nimrod/Downloads/cuda/include/* /usr/local/cuda/include/
7
  • I've already tried that, that's why I was trying other things. That's what I get when I type the second line: cp: target '/usr/local/cuda/lib64/' is not a directory
    – Niminim
    Dec 2, 2017 at 14:05
  • 1
    @Niminim That's crucial information and belongs in your question, please edit and add it. Alright, just create the directory then: sudo mkdir -p /usr/local/cuda/lib64.
    – dessert
    Dec 2, 2017 at 14:18
  • You're right. I've just added that. Anyway, I do have that library, so it's odd.
    – Niminim
    Dec 2, 2017 at 14:36
  • there was such library so it should have worked. Anyway, after using the mkdir second line works fine. Now I have a problem with third line. I get: "cp: cannot create regular file '/usr/local/cuda/include/': Not a directory" . How do I solve that?
    – Niminim
    Dec 2, 2017 at 14:42
  • 1
    @Niminim Does it say Not a directory or rather No such file or directory? If the latter just create this dir as well with sudo mkdir -p /usr/local/cuda/include (can't do any harm anyway).
    – dessert
    Dec 2, 2017 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.