Jetson Orin AGX上的CUDA开发报错:No CMAKE_CUDA_COMPILER could be found.

Jetson Orin AGX上的CUDA开发报错:CMake Error at CMakeLists.txt:3 (project):No CMAKE_CUDA_COMPILER could be found.

环境

  • 设备:Jetson Orin AGX
  • Model:Jetson AGX Orin - Jetpack 5.1.1 [L4T 35.3.1]
  • Distribution: Ubuntu 20.04 focal
  • Release: 5.10.104-tegra
  • CUDA: 11.4.315
  • cuDNN: 8.6.0.166
  • TensorRT: 8.5.2
  • VPI: 2.2.7
  • Vulkan: 1.3.204
  • OpenCV: 4.5.4 - with CUDA: NO

报错代码

project(TensorRT_YoloV5 LANGUAGES CXX CUDA)

报错内容

在这里插入图片描述

Tell CMake where to find the compiler by setting either the environment
variable “CUDACXX” or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.

解决办法

使用set函数为其指定CUAD的编译器的位置

set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)

注意:你的编译器路径可能和我的不一样!

原因分析

就是没有找到相应的编译器

  • 13
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值