Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing object tracking software in C++ and using OpenCV and highgui. The problem I have right now is that even after sudo yum install opencv and using the yumex frontend to ensure that all of the packages were installed, cv.h is not found when I try to compile.

I looked in /usr/include/ and there's no trace of opencv. What's going on and how can I fix this?

share|improve this question
up vote 2 down vote accepted

Did you install the -devel packages?

Redhat/Fedora splits software into both runtime (which is what you probably have installed) and developer (headers, static libs) packages. It names these developer packages PACKAGENAME-devel.

Check your install, see if you can install the necessary opencv-devel package(s).

share|improve this answer
I installed opencv-devel and still get this error. – tekknolagi Feb 8 '12 at 18:15
@tekknolagi did you verify if the files are around? try: rpm -q --filesbypkg opencv-devel and see where it put the files – Rich Homolka Feb 8 '12 at 18:20
@tekknolagi so it installed it, but not directly in /usr/include. You need to adjust your build to pick up the location, -I/usr/include/opencv – Rich Homolka Feb 8 '12 at 18:38
Thank you! Great job. – tekknolagi Feb 8 '12 at 18:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.