Ask Your Question

OpenCV on older Linux

asked 2016-02-15 16:28:10 -0500

fijoy gravatar image

Hey all,

I need to build OpenCV 3.1 on an older Linux machine, specifically Red Hat Enterprise Linux 6.7 (RHEL 6.7). Is this possible? I will need the C interface of OpenCV only (no Python).

If this build is not possible, what's the latest OpenCV version that can be built on RHEL 6.7?

Thank you, Fijoy

edit retag flag offensive close merge delete


What did you try? What didn't work?

Follow this guide. Normally you should be able to install the required packages and the build should work.

kbarni gravatar imagekbarni ( 2016-02-16 02:53:09 -0500 )edit

The main issue now is that OpenCV 3.1 would prefer Python2.7 and Numpy 1.5 or later. We’ve not been able to locate an existing RPM for either for RHEL 6.7. Red Hat does provide a Developer’s Toolkit that we could install on RHEL 6.7 that would provide some newer versions of tools; however, it doesn’t provide everything required for the build (It does provide Python 2.7, but not Numpy 1.5). The main question now is whether we can build OpenCV with Python and Numpy.

fijoy gravatar imagefijoy ( 2016-02-16 08:47:46 -0500 )edit

as mshabunin said, you don't need Python or Numpy to compile opencv.

cmake automatically detects Python, and if it isn't found, than it won't be supported - but it will still compile for C++.

kbarni gravatar imagekbarni ( 2016-02-16 11:06:39 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2016-02-16 05:59:28 -0500

mshabunin gravatar image

updated 2016-02-16 06:00:01 -0500

Following instructions work for me in CentOS 6.6:

yum groupinstall "Development Tools"
yum install cmake
yum install python-devel
yum install numpy
mkdir build
cd build
cmake ../opencv
make -j4
edit flag offensive delete link more



Then you don't need to install python-devel and numpy. They are not required, but they have been successfully detected by cmake and used during the build in my case (python-2.6.6 and numpy-1.4.1).

mshabunin gravatar imagemshabunin ( 2016-02-16 08:55:20 -0500 )edit

Question Tools



Asked: 2016-02-15 16:28:10 -0500

Seen: 155 times

Last updated: Feb 16 '16