0

I'm having trouble building Darknet with the configuration:

GPU=1
CUDNN=1
CUDNN_HALF=0
OPENCV=1

The error when running the Makefile is:

/usr/include/opencv4/opencv2/stitching/detail/warpers.hpp:47:10: fatal error: opencv2/core/cuda.hpp: No such file or directory    47 |
#include "opencv2/core/cuda.hpp"

I have installed cuda-11.2 and cudann successfully, and verified the installations.

I have tried running sudo apt install libopencv-dev and this was up-to-date.

My setup is:

os: Ubuntu 20.04
cuda version: 11.2
cudann version: 8.1

Can anyone help me install OpenCV such that I can build darknet with OpenCV?

talonmies
  • 70,661
  • 34
  • 192
  • 269
CookieGuy
  • 33
  • 1
  • 7

1 Answers1

1

I was able to solve the issue by running:

sudo apt-get purge --auto-remove libopencv-dev

which purged the package, along with any dependencies required for the package. I then reinstalled the package by running:

sudo apt install libopencv-dev

and Darknet then built without error.

CookieGuy
  • 33
  • 1
  • 7