# Tried to set CUDACXX/CUDA\_PATH etc., but failed to find nvcc

**URL:** https://discourse.cmake.org/t/tried-to-set-cudacxx-cuda-path-etc-but-failed-to-find-nvcc/13352
**Category:** Usage
**Created:** [January 8, 2025, 3:04pm UTC](https://discourse.cmake.org/t/tried-to-set-cudacxx-cuda-path-etc-but-failed-to-find-nvcc/13352 "2025-01-08T15:04:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![workitmakeitdoit](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/b487fb/32.png) [@workitmakeitdoit](https://discourse.cmake.org/u/workitmakeitdoit)
#### Post date: [January 8, 2025, 3:04pm UTC](https://discourse.cmake.org/t/tried-to-set-cudacxx-cuda-path-etc-but-failed-to-find-nvcc/13352/1 "2025-01-08T15:04:22Z")

</div>

I can’t seem to install tensorrt on Manjaro, and it seems to come down to a CMake issue.

I have nvcc installed at /opt/cuda/bin/nvcc and during tensorrt’s build, I get:

```auto
CMake Error at /usr/share/cmake/Modules/Internal/CMakeCUDAFindToolkit.cmake:104 (message):
  Failed to find nvcc.

  Compiler requires the CUDA toolkit. Please set the CUDAToolkit_ROOT
  variable.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:85 (cmake_cuda_find_toolkit)
  CMakeLists.txt:68 (project)

```

I tried setting CUDACXX, CUDA\_PATH etc. according to the instructions in [https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html](https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html)

I tried hacking CMakeCUDAFindToolkit.cmake to force it to use /opt/cuda/ in place of /usr/local/cuda and that results in the error “Failed to detect a default CUDA architecture”.

Is this a CMake usage issue, a bug in tensorrt, or what?
