在 Windows 7 上安装 OpenCV 3.1.0 with CMake,opencv_ffmpeg.dll无效的
Installing OpenCV 3.1.0 with CMake on Windows 7, opencv_ffmpeg.dll invalid hash
我正在尝试使用 CMake 安装带有MSVC2015编译器的 OpenCV 3.1.0。我收到一个错误,指出文件哈希与预期的哈希不同。我在需要安装的PC上无法访问互联网。我厌倦了在有互联网的PC上成功安装它,看看我是否可以在没有互联网的情况下将这些文件复制到PC。但这不起作用,因为 CMake 会删除文件,并尝试以自己的方式进行操作。我也尝试了这个解决方案,但没有用。
以下是错误消息:
CMake Warning at cmake/OpenCVUtils.cmake:872 (message):
Download: Local copy of opencv_ffmpeg.dll has invalid MD5 hash:
d41d8cd98f00b204e9800998ecf8427e (expected:
89c783eee1c47bfc733f08334ec2e31c)
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
Downloading opencv_ffmpeg.dll...
CMake Error at cmake/OpenCVUtils.cmake:895 (file):
file DOWNLOAD HASH mismatch
for file: [C:/OpenCV/opencv/sources/3rdparty/ffmpeg/downloads/89c783eee1c47bfc733f08334ec2e31c/opencv_ffmpeg.dll]
expected hash: [89c783eee1c47bfc733f08334ec2e31c]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
status: [6;"Couldn't resolve host name"]
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
CMake Error at cmake/OpenCVUtils.cmake:899 (message):
Failed to download opencv_ffmpeg.dll. Status=6;"Couldn't resolve host
name"
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:10 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
我希望能够在没有互联网的情况下安装它,但事实证明它非常困难。有人对此有任何解决方案吗?
提前谢谢。
-
我在
opencvsources3dpartyffmpegffmpeg.cmake
中找到了子字符串ffmpeg.dll
:set(FFMPEG_BINARIES_COMMIT "8aeefc4efe3215de89d8c7e114ae6f7a6091b8eb") set(FFMPEG_FILE_HASH_BIN32 "89c783eee1c47bfc733f08334ec2e31c") set(FFMPEG_FILE_HASH_BIN64 "35fe6ccdda6d7a04e9056b0d73b98e76") set(FFMPEG_FILE_HASH_CMAKE "8606f947a780071f8fcce8cbf39ceef5") set(FFMPEG_DOWNLOAD_URL https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${FFMPEG_BINARIES_COMMIT}/ffmpeg/) ocv_download(PACKAGE ...)
-
下载文件:https://raw.githubusercontent.com/Itseez/opencv_3rdparty/8aeefc4efe3215de89d8c7e114ae6f7a6091b8eb/ffmpeg/{opencv_ffmpeg.dll,opencv_ffmpeg_64.dll,ffmpeg_version.cmake}
并将其复制到:
opencvsources3rdpartyffmpegdownloads%HASH%
-
然后
cmake.exe -G "CodeBlocks - MinGW Makefiles" .
和mingw32-make.exe
相关文章:
- 将 OpenCV 与 CMAKE 中的项目一起构建为第三方库的正确方法
- 我怎样才能简单地将opencv 包含在我的项目中与CMake
- OpenCV cmake构建总是在Windows中抛出错误
- 如何使用cmake设置OpenCV以启用动态和静态构建
- 构建MacOS可执行文件,以便使用cmake(包括OpenCV)进行分发
- Opencv 链接 CMAKE 不起作用 Ubuntu 16.04 Docker
- cmake opencv for contrib - 配置不完整,发生错误
- 用于链接 OpenCV 和现有库的生成文件(不使用 cmake)
- CMake - OpenCV - cannot find -lDisplayImage
- CMAKE中断openCV建筑物具有CUDA支持而没有错误
- CMAKE:导入时链接 OpenCV 失败
- 如何在不安装的情况下将opencv源文件作为cmake依赖项包括在内
- 无法使用CMake编译简单的Opencv C++文件
- CMAKE-如何将塔库与OpenCV -C 项目联系起来
- 当尝试添加OpenCV库时,CMAKE错误
- Cmake找到了通往OpenCV库的路径,但没有找到OpenCV函数Rodrigues
- 使用 cmake 在项目中链接 Opencv
- OpenCV 模块作为符号链接会导致 cmake 错误
- OPENCV,使用CMAKE构建C 项目时的链接错误
- Linking libraries opencv cmake