How To Install opencv-devel.x86_64 on Amazon Linux 2

In this tutorial we learn how to install opencv-devel.x86_64 in Amazon Linux 2. opencv-devel.x86_64 is Development files for using the OpenCV library

Introduction

In this tutorial we learn how to install opencv-devel.x86_64 on Amazon Linux 2.

What is opencv-devel.x86_64

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 to install opencv-devel.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install opencv-devel.x86_64.

Install opencv-devel.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install opencv-devel.x86_64

How To Uninstall opencv-devel.x86_64 on Amazon Linux 2

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

sudo yum remove opencv-devel.x86_64

opencv-devel.x86_64 Package Contents on Amazon Linux 2

/usr/include/opencv
/usr/include/opencv/cv.h
/usr/include/opencv/cv.hpp
/usr/include/opencv/cvaux.h
/usr/include/opencv/cvaux.hpp
/usr/include/opencv/cvwimage.h
/usr/include/opencv/cxcore.h
/usr/include/opencv/cxcore.hpp
/usr/include/opencv/cxeigen.hpp
/usr/include/opencv/cxmisc.h
/usr/include/opencv/highgui.h
/usr/include/opencv/ml.h
/usr/include/opencv2
/usr/include/opencv2/calib3d
/usr/include/opencv2/calib3d/calib3d.hpp
/usr/include/opencv2/contrib
/usr/include/opencv2/contrib/contrib.hpp
/usr/include/opencv2/contrib/detection_based_tracker.hpp
/usr/include/opencv2/contrib/hybridtracker.hpp
/usr/include/opencv2/contrib/openfabmap.hpp
/usr/include/opencv2/contrib/retina.hpp
/usr/include/opencv2/core
/usr/include/opencv2/core/core.hpp
/usr/include/opencv2/core/core_c.h
/usr/include/opencv2/core/cuda_devptrs.hpp
/usr/include/opencv2/core/devmem2d.hpp
/usr/include/opencv2/core/eigen.hpp
/usr/include/opencv2/core/gpumat.hpp
/usr/include/opencv2/core/internal.hpp
/usr/include/opencv2/core/mat.hpp
/usr/include/opencv2/core/opengl_interop.hpp
/usr/include/opencv2/core/opengl_interop_deprecated.hpp
/usr/include/opencv2/core/operations.hpp
/usr/include/opencv2/core/types_c.h
/usr/include/opencv2/core/version.hpp
/usr/include/opencv2/core/wimage.hpp
/usr/include/opencv2/features2d
/usr/include/opencv2/features2d/features2d.hpp
/usr/include/opencv2/flann
/usr/include/opencv2/flann/all_indices.h
/usr/include/opencv2/flann/allocator.h
/usr/include/opencv2/flann/any.h
/usr/include/opencv2/flann/autotuned_index.h
/usr/include/opencv2/flann/composite_index.h
/usr/include/opencv2/flann/config.h
/usr/include/opencv2/flann/defines.h
/usr/include/opencv2/flann/dist.h
/usr/include/opencv2/flann/dummy.h
/usr/include/opencv2/flann/dynamic_bitset.h
/usr/include/opencv2/flann/flann.hpp
/usr/include/opencv2/flann/flann_base.hpp
/usr/include/opencv2/flann/general.h
/usr/include/opencv2/flann/ground_truth.h
/usr/include/opencv2/flann/hdf5.h
/usr/include/opencv2/flann/heap.h
/usr/include/opencv2/flann/hierarchical_clustering_index.h
/usr/include/opencv2/flann/index_testing.h
/usr/include/opencv2/flann/kdtree_index.h
/usr/include/opencv2/flann/kdtree_single_index.h
/usr/include/opencv2/flann/kmeans_index.h
/usr/include/opencv2/flann/linear_index.h
/usr/include/opencv2/flann/logger.h
/usr/include/opencv2/flann/lsh_index.h
/usr/include/opencv2/flann/lsh_table.h
/usr/include/opencv2/flann/matrix.h
/usr/include/opencv2/flann/miniflann.hpp
/usr/include/opencv2/flann/nn_index.h
/usr/include/opencv2/flann/object_factory.h
/usr/include/opencv2/flann/params.h
/usr/include/opencv2/flann/random.h
/usr/include/opencv2/flann/result_set.h
/usr/include/opencv2/flann/sampling.h
/usr/include/opencv2/flann/saving.h
/usr/include/opencv2/flann/simplex_downhill.h
/usr/include/opencv2/flann/timer.h
/usr/include/opencv2/highgui
/usr/include/opencv2/highgui/cap_ios.h
/usr/include/opencv2/highgui/highgui.hpp
/usr/include/opencv2/highgui/highgui_c.h
/usr/include/opencv2/imgproc
/usr/include/opencv2/imgproc/imgproc.hpp
/usr/include/opencv2/imgproc/imgproc_c.h
/usr/include/opencv2/imgproc/types_c.h
/usr/include/opencv2/legacy
/usr/include/opencv2/legacy/blobtrack.hpp
/usr/include/opencv2/legacy/compat.hpp
/usr/include/opencv2/legacy/legacy.hpp
/usr/include/opencv2/legacy/streams.hpp
/usr/include/opencv2/ml
/usr/include/opencv2/ml/ml.hpp
/usr/include/opencv2/objdetect
/usr/include/opencv2/objdetect/objdetect.hpp
/usr/include/opencv2/opencv.hpp
/usr/include/opencv2/opencv_modules.hpp
/usr/include/opencv2/photo
/usr/include/opencv2/photo/photo.hpp
/usr/include/opencv2/photo/photo_c.h
/usr/include/opencv2/stitching
/usr/include/opencv2/stitching/detail
/usr/include/opencv2/stitching/detail/autocalib.hpp
/usr/include/opencv2/stitching/detail/blenders.hpp
/usr/include/opencv2/stitching/detail/camera.hpp
/usr/include/opencv2/stitching/detail/exposure_compensate.hpp
/usr/include/opencv2/stitching/detail/matchers.hpp
/usr/include/opencv2/stitching/detail/motion_estimators.hpp
/usr/include/opencv2/stitching/detail/seam_finders.hpp
/usr/include/opencv2/stitching/detail/util.hpp
/usr/include/opencv2/stitching/detail/util_inl.hpp
/usr/include/opencv2/stitching/detail/warpers.hpp
/usr/include/opencv2/stitching/detail/warpers_inl.hpp
/usr/include/opencv2/stitching/stitcher.hpp
/usr/include/opencv2/stitching/warpers.hpp
/usr/include/opencv2/superres
/usr/include/opencv2/superres/optical_flow.hpp
/usr/include/opencv2/superres/superres.hpp
/usr/include/opencv2/ts
/usr/include/opencv2/ts/gpu_perf.hpp
/usr/include/opencv2/ts/gpu_test.hpp
/usr/include/opencv2/ts/ts.hpp
/usr/include/opencv2/ts/ts_gtest.h
/usr/include/opencv2/ts/ts_perf.hpp
/usr/include/opencv2/video
/usr/include/opencv2/video/background_segm.hpp
/usr/include/opencv2/video/tracking.hpp
/usr/include/opencv2/video/video.hpp
/usr/include/opencv2/videostab
/usr/include/opencv2/videostab/deblurring.hpp
/usr/include/opencv2/videostab/fast_marching.hpp
/usr/include/opencv2/videostab/fast_marching_inl.hpp
/usr/include/opencv2/videostab/frame_source.hpp
/usr/include/opencv2/videostab/global_motion.hpp
/usr/include/opencv2/videostab/inpainting.hpp
/usr/include/opencv2/videostab/log.hpp
/usr/include/opencv2/videostab/motion_stabilizing.hpp
/usr/include/opencv2/videostab/optical_flow.hpp
/usr/include/opencv2/videostab/stabilizer.hpp
/usr/include/opencv2/videostab/videostab.hpp
/usr/lib64/cmake
/usr/lib64/cmake/OpenCV
/usr/lib64/cmake/OpenCV/OpenCVConfig-version.cmake
/usr/lib64/cmake/OpenCV/OpenCVConfig.cmake
/usr/lib64/libopencv_calib3d.so
/usr/lib64/libopencv_contrib.so
/usr/lib64/libopencv_core.so
/usr/lib64/libopencv_features2d.so
/usr/lib64/libopencv_flann.so
/usr/lib64/libopencv_highgui.so
/usr/lib64/libopencv_imgproc.so
/usr/lib64/libopencv_legacy.so
/usr/lib64/libopencv_ml.so
/usr/lib64/libopencv_objdetect.so
/usr/lib64/libopencv_photo.so
/usr/lib64/libopencv_stitching.so
/usr/lib64/libopencv_superres.so
/usr/lib64/libopencv_ts.so
/usr/lib64/libopencv_video.so
/usr/lib64/libopencv_videostab.so
/usr/lib64/pkgconfig/opencv.pc

References

Summary

In this tutorial we learn how to install opencv-devel.x86_64 on Amazon Linux 2 using yum.