简体   繁体   English

在Tegra Tx1上安装CUDA并采购bashrc后,它将找不到NVCC

[英]After installing CUDA on Tegra Tx1 and sourcing the bashrc it will not find NVCC

After flashing the Tegra Board the CUDA Drivers (including the CUDA compiler nvcc) must be installed. 刷新Tegra板后,必须安装CUDA驱动程序(包括CUDA编译器nvcc)。 To do so I simply used the given format: 为此,我只使用了给定的格式:

sudo ./cuda-l4t.sh .cuda-repo-l4t-8-0-local_8.0-76_arm64.deb 8.0 8-0

and

source ~/.bashrc

but when I enter nvcc -V it does not show the wanted specification about the nvcc, it just tells me that the command was not recognized 但是当我输入nvcc -V它没有显示有关nvcc的所需规范,它只是告诉我该命令未被识别

First of all you should check if CUDA was really installed! 首先,您应该检查CUDA是否已真正安装!

To do so go to the path: 为此,请转到以下路径:

/usr/local 

There must be a cuda folder or a folder named cuda-8-0 or whatever version you installed. 必须有一个cuda文件夹或一个名为cuda-8-0的文件夹或您安装的任何版本。 Remember the name and the path. 记住名称和路径。 Now check your bashrc by using gedit/vi/nano/vim whatever you prefer: 现在,使用gedit/vi/nano/vim来检查您的bashrc:

vim ~/.bashrc

Go to the bottom of the file. 转到文件底部。 There should be some exports regarding the PATH Variable and the LD_LIBRARY_PATH . 关于PATH变量和LD_LIBRARY_PATH应该有一些导出。 Check if it was written to these variables and then overwritten again. 检查是否已将其写入这些变量,然后再次覆盖。

You must export the Path to the bin folder of your CUDA application and the Path to lib64 folder. 您必须将路径导出到CUDA应用程序的bin文件夹,并将路径导出到lib64文件夹。

To do so at the bottom of the bashrc must stand something like this: 为此,必须在bashrc的底部保留以下内容:

export PATH=/usr/local/cuda-8.0/bin: ....
export LD_LIBARY_PATH=/usr/local/cuda-8.0/lib64: ....

After the double dots may follow some other paths. 之后,双点可能会遵循其他一些路径。 make sure that the path given to the cuda application is the correct one and that it is not overwritten again. 确保提供给cuda应用程序的路径是正确的路径,并且不会再次被覆盖。

After you made the correct changed do not forget to source the basrhc again. 进行正确的更改后,请不要忘记再次获取basrhc。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM