在ARM Docker容器中构建OPENCV时出现问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在ARM Docker容器中构建OPENCV时出现问题相关的知识,希望对你有一定的参考价值。
在ARM Docker容器中构建OPENCV时遇到问题:
-- Configuring incomplete, errors occurred!
See also "/tmp/opencv/opencv-3.4.2/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/opencv/opencv-3.4.2/build/CMakeFiles/CMakeError.log".
The command '/bin/sh -c cd /tmp/opencv/opencv-3.4.2 && mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv/opencv_contrib-3.4.2/modules -D BUILD_DOCS=OFF -D BUILD_EXAMPLES=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_opencv_java=OFF -D BUILD_opencv_python=OFF -D BUILD_opencv_python2=OFF -D BUILD_opencv_python3=OFF .. && make -j1 && make install && rm -rf /tmp/opencv' returned a non-zero code: 1
这是我使用的Dockerfile:
FROM armhf/ubuntu
LABEL maintainer="Xxxxx XXXX <xxxx.xxxx@xxxx.com>"
# Dependencies
RUN apt-get update &&
apt-get upgrade -y &&
apt-get install -y wget unzip build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
# Download OPENCV
RUN mkdir -p /tmp/opencv &&
cd /tmp/opencv &&
wget --show-progress --quiet -O opencv.zip https://github.com/opencv/opencv/archive/3.4.2.zip &&
unzip -o -q opencv.zip &&
wget --show-progress --quiet -O opencv_contrib.zip https://github.com/opencv/opencv/archive/3.4.2.zip &&
unzip -o -q opencv_contrib.zip &&
rm opencv.zip opencv_contrib.zip
# Build OPENCV
RUN cd /tmp/opencv/opencv-3.4.2 &&
mkdir build &&
cd build &&
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv/opencv_contrib-3.4.2/modules
-D BUILD_DOCS=OFF
-D BUILD_EXAMPLES=OFF
-D BUILD_TESTS=OFF
-D BUILD_PERF_TESTS=OFF
-D BUILD_opencv_java=OFF
-D BUILD_opencv_python=OFF
-D BUILD_opencv_python2=OFF
-D BUILD_opencv_python3=OFF .. &&
make -j1 &&
make install &&
rm -rf /tmp/opencv
ADD go-coop-camera /usr/bin
WORKDIR /usr/bin
EXPOSE 8000
CMD [ "/usr/bin/go-coop-camera", "--logging", "info" ]
你看到可能出错的东西吗?我尝试应用此修复程序:https://github.com/opencv/opencv/issues/6027
但它没有用。
答案
我想它看起来太明显了,我被下载了两次相同的ZIP ..
https://github.com/opencv/opencv/archive/3.4.2.zip
代替
https://github.com/opencv/opencv_contrib/archive/3.4.2.zip
以上是关于在ARM Docker容器中构建OPENCV时出现问题的主要内容,如果未能解决你的问题,请参考以下文章
Docker 容器在运行 php 应用程序时出现 503 错误
使用 docker-compose 构建容器时出现“php_network_getaddresses:getaddrinfo failed:Temporary failure in name reso
在节点 Docker 容器中运行项目时出现 Tailwind CSS EACCESS 错误(Docker Compose)