Qengineering/Install-OpenCV-Jetson-Nano

Can't find header files after install

alex-ssom opened this issue · 3 comments

Hi,
After installing OpenCV 4.5.4 using your script with success. I can't compile my code, i'm using CMake and it's compiling on my desktop but not on the Jetson Nano.

$ jetson_release -v
 - NVIDIA Jetson Nano (Developer Kit Version)
   * Jetpack 4.6 [L4T 32.6.1]
   * NV Power Mode: MAXN - Type: 0
   * jetson_stats.service: active
 - Board info:
   * Type: Nano (Developer Kit Version)
   * SOC Family: tegra210 - ID:33
   * Module: P3448-0000 - Board: P3449-0000
   * Code Name: porg
   * Boardids: 3448
   * CUDA GPU architecture (ARCH_BIN): 5.3
   * Serial Number: 1422919050898
 - Libraries:
   * CUDA: 10.2.300
   * cuDNN: 8.2.1.32
   * TensorRT: 8.0.1.6
   * Visionworks: 1.6.0.501
   * OpenCV: 4.5.4 compiled CUDA: YES
   * VPI: ii libnvvpi1 1.1.12 arm64 NVIDIA Vision Programming Interface library
   * Vulkan: 1.2.70
 - jetson-stats:
   * Version 3.1.1
   * Works on Python 2.7.17

See the error message:

fatal error: opencv2/core/core.hpp: No such file or directory
 #include <opencv2/core/core.hpp>
                ^~~~~~~~~~~~~~~~~~~~~~~

When I run find / -name opencv.pc the package config file isn't found.

It looks like the header files weren't installed.

Please check the following locations on your Nano:

  • /usr/bin - executable files
  • /usr/lib/aarch64-linux-gnu - libraries (.so)
  • /usr/lib/aarch64-linux-gnu/cmake/opencv4 - cmake package
  • /usr/include/opencv4 - headers
  • /usr/share/opencv4 - other files (e.g. trained cascades in XML format)

You will not find a package opencv.pc, it's opencv4.pc

Thanks for the quick reply. I'll check this out.

For some reason, the /usr/include/opencv4 was empty. I recompiled and the header files are now present.