How to install OpenCV on Amazon Linux?

前端 未结 2 570
猫巷女王i
猫巷女王i 2020-12-18 14:23

I\'m trying to install OpenCV for use with Pastec on an Amazon Linux instance. This is my first time using an Amazon service, and I don\'t have much experience using linux..

2条回答
  •  甜味超标
    2020-12-18 14:47

    It seems that default yum repo for Amazon AMI doesn't contain OpenCV packages.

    You can compile it from sources by yourself with the following simple steps:

    • install necessary packages:

    sudo yum install git cmake gcc-c++

    • clone OpenCV from repository:

    git clone https://github.com/Itseez/opencv.git

    • (optionally) choose required version:

    git checkout

    • compile and install - create folder in which you want to build it, enter there and type:

    cmake make sudo make install

    It's basic steps - after this you will have OpenCV with some default modules. You can read cmake output and adjust your installation before actual build. Possibly you should install additional packages for your needs (like libpng, libjpg, python etc.).

提交回复
热议问题