CMake OpenCV 安装问题

CMake OpenCV 安装问题

这三个小时让我发疯了。我简单地想要安装 CMake,然后安装 OpenCV 3.1,但出现错误Unsupported protocol(请参见下文)。

我安装了 CMake 3.4.3。像这样:

wget https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz
tar xf cmake-3.4.3.tar.gz
cd cmake-3.4.3
./configure
make
sudo make install

然后运行这个:

./bootstrap --prefix=/usr
make
sudo make install

当我在 OpenCV 的安装过程中运行此命令时出现错误:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

这是我收到的确切错误:

CMake Warning at 3rdparty/ippicv/downloader.cmake:56 (message):
  ICV: Local copy of ICV package has invalid MD5 hash:
  d41d8cd98f00b204e9800998ecf8427e (expected:
  808b791a6eac9ed78d32a7666804320e)
Call Stack (most recent call first):
  3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
  cmake/OpenCVFindIPP.cmake:237 (include)
  cmake/OpenCVFindLibsPerf.cmake:12 (include)
  CMakeLists.txt:537 (include)


-- ICV: Downloading ippicv_linux_20151201.tgz...
CMake Error at 3rdparty/ippicv/downloader.cmake:73 (file):
  file DOWNLOAD HASH mismatch

    for file: [/home/ao/opt/opencv/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ippicv_linux_20151201.tgz]
      expected hash: [808b791a6eac9ed78d32a7666804320e]
        actual hash: [d41d8cd98f00b204e9800998ecf8427e]
             status: [1;"Unsupported protocol"]

Call Stack (most recent call first):
  3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
  cmake/OpenCVFindIPP.cmake:237 (include)
  cmake/OpenCVFindLibsPerf.cmake:12 (include)
  CMakeLists.txt:537 (include)


CMake Error at 3rdparty/ippicv/downloader.cmake:77 (message):
  ICV: Failed to download ICV package: ippicv_linux_20151201.tgz.
  Status=1;"Unsupported protocol"
Call Stack (most recent call first):
  3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
  cmake/OpenCVFindIPP.cmake:237 (include)
  cmake/OpenCVFindLibsPerf.cmake:12 (include)
  CMakeLists.txt:537 (include)

因此显然存在哈希不匹配的情况。我猜这是 CMake 的问题(也许我的安装不正确?)。我该如何修复这个问题,安装 OpenCV 应该没那么难,对吧?

答案1

我找到了解决方案评论基本上我只需要手动下载文件ippicv_linux_20151201.tgz(从这里) 并将 zip 文件移动到正确的位置 ( /home/ao/opt/opencv/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/)。

然后它就可以编译了:)

答案2

或者,你可以使用 SSL 支持重新编译 cmake,因为这最终是“哈希不匹配”的原因(状态:[1;“不支持的协议”])

答案3

从 :

https://stackoverflow.com/questions/32749454/opencv-installation-error-ubuntu-14-04/38054298#38054298

再试一次:

 cmake \
 -DOPENCV_ICV_URL="http://downloads.sourceforge.net/project/opencvlibrary/3rdparty/ippicv"

答案4

如果您确定不想使用此第三方实用程序,您可以轻松禁用 IPP 选项。

-DWITH_IPP=OFF

相关内容