Permissions Error With Samples Install

Attempting to run: ‘cuda-install-samples-9.1.sh’
which returns: 'cuda-install-samples-9.1.sh
Will append NVIDIA_CUDA-9.1_Samples to ’

Next I attempt: ‘cuda-install-samples-9.1.sh usr/local/cuda-9.1/samples’
Which returns: 'Do not have permissions to write to usr/local/cuda-9.1/samples/NVIDIA_CUDA-9.1_Samples

If I try running it with ‘sudo’ prefix, I get ‘command not found’

How do I go about extracting these samples? All I want to do is complete Step 7.2.2 in the post-installation for 9.1.

Thanks

The cuda samples should already be installed at

/usr/local/cuda-9.1/samples

did you check there? (e.g. ls /usr/local/cuda-9.1/samples)

Notice what the 7.2.2 section that you refer to mentions:

The cuda-samples-9-1 package installs only a read-only copy in /usr/local/cuda-9.1/samples.

When you use sudo, apparently the directory where the script is located is not on your sudo PATH.

If you really want to run that script, try:

sudo /usr/local/cuda-9.1/bin/cuda-install-samples-9.1.sh /path/to/where/I/want/to/put/the/samples

However as mentioned in the section 7.2.2, since the samples should already be at /usr/local/cuda-9.1/samples, the purpose of the script is so you can put them somewhere else (if you want), like in one of your user directories that you have write access to.

If the samples are already in /usr/local/cuda-9.1/samples, I wouldn’t use this script to “reinstall” them there.