vim ~/.bashrc #修改配置文件(如果你用的是zsh,则需要修改 ~/.zshrc文件)
export PATH=$PATH:/usr/local/cuda-9.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-9.0/lib64
使用source ~/.bashrc 使其生效
vim ~/.bashrc #修改配置文件(如果你用的是zsh,则需要修改 ~/.zshrc文件)
export PATH=$PATH:/usr/local/cuda-9.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-9.0/lib64
使用source ~/.bashrc 使其生效