Global Library Export

What is the proper way to export the CUDA libraries and bins to “all users” without having to utilize the “.bashrc” method?

The “.bashrc” method is causing some issues for me. Also I tried “/etc/environment” but that has not exactly helped much.

Thanks!

Edit /etc/ld.so.conf or add a new file to /etc/ld.so.conf.d and rerun ldconfig afterwards

Thank You!

How about the binarys? Where would I set those? env?

local binaries usually live in /usr/local/bin and that path should be in the PATH envvar by default.

/etc/environment looks like the right place. Just make sure you didn’t mess up too much with it. Here is mine:

cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-6.0/bin"

You have to re-login in order for it to work. Upon fresh login:

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-6.0/bin
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Sat_Mar_15_02:05:29_PDT_2014
Cuda compilation tools, release 6.0, V6.0.1