not a valid identifier

Hi,

I have a trouble with the environment setup, http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#mandatory-post, which says

[i]In addition, when using the runfile installation method, the LD_LIBRARY_PATH variable needs to contain /usr/local/cuda-9.1/lib64 on a 64-bit system, or /usr/local/cuda-9.1/lib on a 32-bit system

To change the environment variables for 64-bit operating systems:

export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64\ {LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

[/i]

I copy and paste it to ~/.bashrc and my bash shell prints following message as starting up,

-bash: export: `:/usr/local/cuda-9.1/lib64’: not a valid identifier

I double-checked that the path exists.
I’m looking forward to your help and advice.

Bit of a late reply - I had a similar problem when I added the path to my environment from the CLI, so I added it manually; on the way, I came across this.

Here’s what you want to add in .bashrc or .bash_profile or .profile:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.1/lib64

This will append the new path onto whatever LD library path you already have.

For example, part of my .bash_profile looks like this:

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/local/bin
export PATH=$PATH:/Library/NNM/bin
export PATH=$PATH:/Developer/NVIDIA/CUDA-9.1/bin

If I echo $PATH, it looks like so:

/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/local/bin:/Library/NNM/bin:/Developer/NVIDIA/CUDA-9.1/bin

Hope that helps someone.