yum包管理器
就像windows下面的360、基山毒霸一样,提供应用搜索、应用已安装列表、应用删除。只不过linux下的是命令行操作的,windows下面是有GUI作为接口。 在ubuntu和debian下面的叫apt,在centos 下面的叫yum。基本上在ubuntu下面的包和centos下面的包,都是一致的。运行时库的名字基本相同,编译时库的名字略有差别。比如:在centos下面叫:opencv-devel,在ubuntu下面叫:libopencv-dev
查看opencv所需安装库
[root@izwz93atpalb56zydy9bpyz ~]# yum search opencv
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cloud.aliyuncs.com
* centos-sclo-rh: mirrors.163.com
* centos-sclo-sclo: mirrors.163.com
* elrepo: mirrors.neusoft.edu.cn
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
============================================================================== N/S matched: opencv ===============================================================================
frei0r-plugins-opencv.x86_64 : Frei0r plugins using OpenCV
opencv-core.i686 : OpenCV core libraries
opencv-core.x86_64 : OpenCV core libraries
opencv-devel.i686 : Development files for using the OpenCV library
opencv-devel.x86_64 : Development files for using the OpenCV library
opencv-devel-docs.noarch : Development files for using the OpenCV library
opencv-python.x86_64 : Python bindings for apps which use OpenCV
opencv.i686 : Collection of algorithms for computer vision
opencv.x86_64 : Collection of algorithms for computer vision
Name and summary matches only, use "search all" for everything.
[root@izwz93atpalb56zydy9bpyz ~]#
其中opencv.x86_64、opencv-core.x86_64是运行时库,opencv-devel.x86_64是编译时库,opencv-python.x86_64是python接口库
安装opencv
[root@izwz93atpalb56zydy9bpyz ~]# yum install opencv opencv-devel -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cloud.aliyuncs.com
* centos-sclo-rh: mirrors.163.com
* centos-sclo-sclo: mirrors.163.com
* elrepo: mirrors.neusoft.edu.cn
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
Package opencv-2.4.5-3.el7.x86_64 already installed and latest version
Package opencv-devel-2.4.5-3.el7.x86_64 already installed and latest version
Nothing to do
[root@izwz93atpalb56zydy9bpyz ~]#
由于我这里已经安装,所以只提示了已经是最新版本(如果不是最新版本,则会刷新到最新版本)
查看已安装包全名
[root@izwz93atpalb56zydy9bpyz ~]# yum list installed | grep opencv
opencv.x86_64 2.4.5-3.el7 @base
opencv-core.x86_64 2.4.5-3.el7 @base
opencv-devel.x86_64 2.4.5-3.el7 @base
查看包安装路径
[root@izwz93atpalb56zydy9bpyz ~]# rpm -ql opencv-devel.x86_64
/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
[root@izwz93atpalb56zydy9bpyz ~]#
yum删除opencv库
[root@izwz93atpalb56zydy9bpyz ~]# yum autoremove opencv opencv-devel
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package opencv.x86_64 0:2.4.5-3.el7 will be erased
---> Package opencv-devel.x86_64 0:2.4.5-3.el7 will be erased
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
---> Marking opencv-core to be removed - no longer needed by opencv
Found and removing 1 unneeded dependencies
--> Running transaction check
---> Package opencv-core.x86_64 0:2.4.5-3.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================
Removing:
opencv x86_64 2.4.5-3.el7 @base 25 M
opencv-devel x86_64 2.4.5-3.el7 @base 2.6 M
Removing for dependencies:
opencv-core x86_64 2.4.5-3.el7 @base 5.5 M
Transaction Summary
==================================================================================================================================================================================
Remove 2 Packages (+1 Dependent package)
Installed size: 33 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : opencv-devel-2.4.5-3.el7.x86_64 1/3
Erasing : opencv-2.4.5-3.el7.x86_64 2/3
Erasing : opencv-core-2.4.5-3.el7.x86_64 3/3
Verifying : opencv-2.4.5-3.el7.x86_64 1/3
Verifying : opencv-devel-2.4.5-3.el7.x86_64 2/3
Verifying : opencv-core-2.4.5-3.el7.x86_64 3/3
Removed:
opencv.x86_64 0:2.4.5-3.el7 opencv-devel.x86_64 0:2.4.5-3.el7
Dependency Removed:
opencv-core.x86_64 0:2.4.5-3.el7
Complete!
[root@izwz93atpalb56zydy9bpyz ~]#