linux nvcc
时间: 2023-10-17 18:35:05 浏览: 91
Linux中的nvcc是NVIDIA CUDA编译套件的主要包装器,用于编译和链接主机和GPU代码。你可以使用以下命令来查看当前安装的CUDA版本:nvcc -V或nvcc --version。如果出现“nvcc: command not found”的错误,首先请检查/usr/local/cuda/bin目录下是否存在nvcc。如果存在,可以将CUDA路径添加到系统路径中,方法如下:打开配置文件~/.bashrc,添加以下两行:
export LD_LIBRARY_PATH=/usr/local/cuda/lib
export PATH=$PATH:/usr/local/cuda/bin
然后运行source ~/.bashrc命令使配置生效。再次执行nvcc -V命令,你就可以看到相应的CUDA版本。请注意,nvidia-smi命令无法真实反映系统安装的CUDA版本,因为CUDA的版本可以低于与其驱动程序最高兼容的CUDA版本。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [linux安装nvidia驱动和cuda](https://blog.csdn.net/destinyttxs/article/details/128222180)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [Linux查看CUDA版本以及nvcc: command not found](https://blog.csdn.net/NCU_wander/article/details/129668084)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文