1.打开终端并输入:
sudo gedit ~/.bashrc
2.在打开的文件末尾添加如下代码:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
3.保存以后,在终端运行如下代码:
source ~/.bashrc
1.打开终端并输入:
sudo gedit ~/.bashrc
2.在打开的文件末尾添加如下代码:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
3.保存以后,在终端运行如下代码:
source ~/.bashrc