How To Install opencv-devel on CentOS 7

In this tutorial we learn how to install opencv-devel on CentOS 7. opencv-devel is Development files for using the OpenCV library

Introduction

In this tutorial we learn how to install opencv-devel on CentOS 7.

What is opencv-devel

This package contains the OpenCV C/C++ library and header files, as well as documentation. It should be installed if you want to develop programs that will use the OpenCV library. You should consider installing opencv-devel-docs package. This package contains the OpenCV C/C++ library and header files, as well as documentation. It should be installed if you want to develop programs that will use the OpenCV library. You should consider installing opencv-devel-docs package.

We can use yum or dnf to install opencv-devel on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install opencv-devel.

Install opencv-devel on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install opencv-devel using yum by running the following command:

sudo yum -y install opencv-devel

Install opencv-devel on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install opencv-devel using dnf by running the following command:

sudo dnf -y install opencv-devel

How To Uninstall opencv-devel on CentOS 7

To uninstall only the opencv-devel package we can use the following command:

sudo dnf remove opencv-devel

References

Summary

In this tutorial we learn how to install opencv-devel on CentOS 7 using yum and dnf.