【nvcc -V】bash: nvcc: command not found...

解决方案:

修改bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

export PATH=/usr/local/cuda-11.6/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64

再source ~/.bashrc激活环境

你可能感兴趣的:(基本知识,bash,linux,开发语言)