ubuntu 安装cmake、ncnn、opencv
1.cmake:在http://www.cmake.org/files找到自己想下的版本,这里下载3.6.2
sudo apt-get install build-essential
wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
tar xf cmake-3.6.2.tar.gz
cd cmake-3.6.2
./configure
make
sudo make install
安装完可以用以下命令查看Cmake版本,看看安装好了没
cmake --version
如果以前安装过,就执行
hash -r
cmake --version
2.安装opencv3.4.3
官网:https://opencv.org/releases.html,下载soures
下载解压,并进入opencv3.4.3文件夹内
cd opencv-3.4.3
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install
检测是否安装成功:
pkg-config --modversion opencv
3.安装ncnn
git clone https://github.com/Tencent/ncnn.git
cd ncnn
mkdir -p build
cd build
cmake ..
make -j4