ubuntu 安装CUDA忽略gcc版本
老铁们一定是这样操作的:
$ sudo sh cuda_10.2.89_440.33.01_linux.run
Failed to verify gcc version.
See log at /var/log/cuda-installer.log for details.
然后vim查看文件/var/log/cuda-installer.log
说是GCC版本不兼容,要是想忽略这个问题,请使用--override
参数
于是乎就可以:
sudo sh cuda_10.2.89_440.33.01_linux.run --override
然后根据提示进行安装,最后的summary最重要的是这两句:
Please make sure that
- PATH includes /usr/local/cuda-10.2/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-10.2/lib64, or, add /usr/local/cuda-10.2/lib64 to /etc/ld.so.conf and run ldconfig as root
就是要在路径中添加/usr/local/cuda-10.2/bin
和/usr/local/cuda-10.2/lib64
就是vim ~/.bashrc
,在末尾添加:
export PATH="/usr/local/cuda-10.2/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH"
That’ s all. 暂时由于GCC兼容的问题还没有遇到hhh
参考资料
- Linux安装CUDA GCC版本不兼容:https://blog.csdn.net/HaoZiHuang/article/details/109544443
评论 (0)