Jetson Orin Nano, Build Error in OpenCV with Cuda(no to yes)

Hello~ i want to build OpenCV with Cuda, and then first i do is to change jtop’s open cv with cuda NO ->yes.

this is my jtop, and i watched “https://www.youtube.com/watch?v=art0-99fFa8&t=86s” this video, and tryng… but when i build the file from $ ./build_opencv.sh 4.8.0 … keep same errors come

jetson@ubuntu:~/nano_build_opencv$ ./build_opencv.sh 4.8.0
It appears an existing build exists in /tmp/build_opencv
Do you wish to remove temporary build files in /tmp/build_opencv ?
(Doing so may make running tests on the build later impossible)
Y/N y
rm: cannot remove ‘/tmp/build_opencv/opencv/build/modules/java/jar/opencv/MANIFEST.MF’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/modules/java/jar/opencv/java’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/68’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/25’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/30’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/67’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/27’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/90’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/66’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/10’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/26’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/71’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/33’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/23’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/28’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/24’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/65’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/77’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/count.txt’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/8’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/9’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/31’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/21’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/32’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/83’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/100’: Permission denied
rm: cannot remove ‘/tmp/build_opencv/opencv/build/CMakeFiles/Progress/22’: Permission denied

how can i solve this? i already used to use chat gpt, but didn’t work. this probles look like not related with remove or not…

sudo rm -r /tmp/build_opencv/

I think it may be better to address your questions to

you ran something with sudo at some point, eh?

um… no, after git clone to src directoty, and use “gedit build_opencv.sh” → fix the .sh file to fit on my opencv, library version for dependency, and then write “./build_opencv.sh 4.8.0” … that code cause that error

i already did that, and even my build script have that code… so i don’t know what is problem

That’s interesting do you have enough disk space?

If your using an external (not official OpenCV) build script then ask the person/organization who provided you with it.

oh i solved it, this is famous problem in openCV. bcz openCV 4.8.0 doesn’t support cuda 12.2 so… just i need to upgrade openCV version. thankyou for ur help bro~