Fatal error: cuda.h, No such file or directory
程序员文章站
2022-07-01 20:32:04
...
Fatal error: cuda.h, No such file or directory
最近在编译别人源代码的时候,gcc
报了如下错误:Fatal error: cuda.h, No such file or directory
解决方法分为两步:
-
在
~/.bashrc
中设置环境变量export CUDA_HOME=/home/usr/local/cuda-9.0 export PATH=$CUDA_HOME/bin:$PATH export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
-
一般来说第一步就可以解决问题了,但是我的情况还需要进行第二步操作,即创建一个软连接:
ln -s /home/usr/local/cuda-9.0 /usr/local/cuda
推荐阅读
-
在Linux中修复“fatal error: x264.h: No such file or directo”错误的方法
-
NET下编译C++代码时出现fatal error C1083: 无法打开包含文件:“iostream.h”: No such file or director
-
Python Error: /usr/bin/env: python3: No such file or directory
-
VMWare 15 Error on Ubuntu 18.4 - Could not open /dev/vmmon: No such file or directory
-
error trying to exec 'cc1plus': execvp: No such file or directory
-
Error: ENOENT: no such file or directory, uv_cwd Error: Cannot find module
-
Linux内核编译时出现fatal error: openssl/opensslv.h: No such file or directory错误的解决办法
-
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
-
scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h: No such file or directory
-
交叉编译BusyBox 构建根文件系统出错fatal error: gnu/stubs-soft.h: No such file or directory