# Couldn't Compile OpenCV with WITH\_CUDA=ON

**URL:** <https://deeptalk.lambda.ai/t/couldnt-compile-opencv-with-with-cuda-on/2145>\
**Category:** Technical Help\
**Created:** [February 4, 2021, 8:24am UTC](https://deeptalk.lambda.ai/t/couldnt-compile-opencv-with-with-cuda-on/2145 "2021-02-04T08:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kev1n](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kev1n](https://deeptalk.lambda.ai/u/kev1n)\
**Post date:** [February 4, 2021, 8:24am UTC](https://deeptalk.lambda.ai/t/couldnt-compile-opencv-with-with-cuda-on/2145/1 "2021-02-04T08:24:53Z")

</div>

I try to install OpenCV with CUDA. I followed the instruction from [OpenCV in lambda-stack - non-gpu? - #2 by leonnowsden](https://deeptalk.lambda.ai/t/opencv-in-lambda-stack-non-gpu/2129/2)

When I cmake the file, I got the error that said:

> – Found Threads: TRUE  
> CMake Warning at cmake/OpenCVFindLibsPerf.cmake:45 (message):  
> OpenCV is not able to find/configure CUDA SDK (required by WITH\_CUDA).
> 
> CUDA support will be disabled in OpenCV build.
> 
> To eliminate this warning remove WITH\_CUDA=ON CMake configuration option.

I think this may be related to the CUDA path. Because if you install the nvidia-cuda-toolkit manually, by default the path of CUDA should be /usr/local/cuda-11.0. But I can’t find this path with Lambda Stack installed.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![MikeBee](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MikeBee](https://deeptalk.lambda.ai/u/MikeBee)\
**Post date:** [February 5, 2021, 6:45am UTC](https://deeptalk.lambda.ai/t/couldnt-compile-opencv-with-with-cuda-on/2145/2 "2021-02-05T06:45:45Z")

</div>

I don’t think you want cuda to build opencv. You want to use it later, but the make file doesn’t have anything that wants cuda.
