用cmake安装opencv遇到缺少ippicv-macosx-*.*文件的解决方案

  1. 既然出错,那么你一定可以看到报错提示,大致如下。这里面你收获了第一个关键信息expected hash: [4ff1fde9a7cfdfe7250bfcd8334e0f2f]

    1
    for file: [/Users/CoderQ/Downloads/opencv-3.1.0/3rdparty/ippicv/downloads/macosx-4ff1fde9a7cfdfe7250bfcd8334e0f2f/ippicv_macosx_20151201.tgz]
      expected hash: [4ff1fde9a7cfdfe7250bfcd8334e0f2f]
        actual hash: [cc09c2a46b5dd28acea8e1e78e296670]
             status: [28;"Timeout was reached"]
  2. 上搜索引擎搜4ff1fde9a7cfdfe7250bfcd8334e0f2f,你会发现第一个搜索结果指向了源码地址

  3. 代码里OPENCV_ICV_PACKAGE_HASH这个变量指向了4ff1fde9a7cfdfe7250bfcd8334e0f2f

  4. 之后你会找到这行代码,他告诉你这个URL地址还需要另一个变量OPENCV_ICV_URL

    1
    file(DOWNLOAD "${OPENCV_ICV_URL}/${OPENCV_ICV_PACKAGE_NAME}" "${OPENCV_ICV_PACKAGE_ARCHIVE}"
  5. 之后根据源码你可以拼出这个地址

    1
    https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_macosx_20151201.tgz
  6. 把文件下载后放在提示的地址,重新安装。

    1
    /Users/CoderQ/Downloads/opencv-3.1.0/3rdparty/ippicv/downloads/macosx-4ff1fde9a7cfdfe7250bfcd8334e0f2f/ippicv_macosx_20151201.tgz
文章目录
,