1. 程式人生 > >opencv recipe for target 'all' failed解決

opencv recipe for target 'all' failed解決

在編譯opencv3.0的時候,編譯到了90%都成功了,然後報了這個異常,網上搜索,也沒找到正確方法

最後解決方式是:

之前的指令碼都需要執行

在執行apt-get update時,下載一個東西,下載了1000多遍也不成,把update註釋掉,再執行前面的安裝

再編譯,就成功了。

https://github.com/cmayet/docker_python2.7_opencv3.0.0
#!/bin/bash

apt-get update
apt-get install -y --no-install-recommends apt-utils
apt-get install -y --no-install-recommends python python-pip \
libpython2.7 \
build-essential \
gfortran \
libatlas-base-dev \
python-dev \
python2.7-dev \
python-tk \
cmake pkg-config \
libjpeg8-dev \
libtiff5-dev \
libjasper-dev \
libpng12-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libv4l-dev wget \
unzip

pip install --upgrade pip
pip install numpy

wget --no-check-certificate https://codeload.github.com/opencv/opencv/zip/3.0.0
unzip 3.0.0 && rm -rf 3.0.0
cd opencv-3.0.0&& mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make -j 4
make install

apt-get remove --purge -y gfortran build-essential cmake python-pip
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives