当前位置:   article > 正文

Cmake 编译opencv缺少出现下载ffmpeg_ffmpeg_version.cmake

ffmpeg_version.cmake

编译opencv源码出现以下问题:

CMake Warning at cmake/OpenCVDownload.cmake:190 (message):
FFMPEG: Download failed: 6;"Couldn't resolve host name"
For details please refer to the download log file:
F:/opencv3.4.10/newbuild/CMakeDownloadLog.txt
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:20 (ocv_download)
cmake/OpenCVFindLibsVideo.cmake:218 (download_win_ffmpeg)
CMakeLists.txt:602 (include)

 

如下CMakeDownloadLog.txt

#use_cache "E:/Install/opencv/opencv-3.4.10/.cache"
#do_copy "opencv_ffmpeg.dll" "301ae2000e25f800ab8e0065f277ad28" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/e81ccda615672833b578c6cefdb859ad69c560ba/ffmpeg/opencv_ffmpeg.dll" "Z:/opencv/x64/3rdparty/ffmpeg"
#missing "Z:/opencv/x64/3rdparty/ffmpeg/opencv_ffmpeg.dll"
#check_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/301ae2000e25f800ab8e0065f277ad28-opencv_ffmpeg.dll"
#mismatch_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/301ae2000e25f800ab8e0065f277ad28-opencv_ffmpeg.dll" "d41d8cd98f00b204e9800998ecf8427e"
#delete "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/301ae2000e25f800ab8e0065f277ad28-opencv_ffmpeg.dll"
#cmake_download "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/301ae2000e25f800ab8e0065f277ad28-opencv_ffmpeg.dll" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/e81ccda615672833b578c6cefdb859ad69c560ba/ffmpeg/opencv_ffmpeg.dll"
#try 1
# timeout on name lookup is not supported
# getaddrinfo(3) failed for raw.githubusercontent.com:443
# Couldn't resolve host 'raw.githubusercontent.com'
# Closing connection 0

#do_copy "opencv_ffmpeg_64.dll" "d87ce032289c3f811d02f0c3d8dbe366" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/e81ccda615672833b578c6cefdb859ad69c560ba/ffmpeg/opencv_ffmpeg_64.dll" "Z:/opencv/x64/3rdparty/ffmpeg"
#missing "Z:/opencv/x64/3rdparty/ffmpeg/opencv_ffmpeg_64.dll"
#check_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/d87ce032289c3f811d02f0c3d8dbe366-opencv_ffmpeg_64.dll"
#mismatch_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/d87ce032289c3f811d02f0c3d8dbe366-opencv_ffmpeg_64.dll" "d41d8cd98f00b204e9800998ecf8427e"
#delete "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/d87ce032289c3f811d02f0c3d8dbe366-opencv_ffmpeg_64.dll"
#cmake_download "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/d87ce032289c3f811d02f0c3d8dbe366-opencv_ffmpeg_64.dll" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/e81ccda615672833b578c6cefdb859ad69c560ba/ffmpeg/opencv_ffmpeg_64.dll"
#try 1
# timeout on name lookup is not supported
# getaddrinfo(3) failed for raw.githubusercontent.com:443
# Couldn't resolve host 'raw.githubusercontent.com'
# Closing connection 0

#do_copy "ffmpeg_version.cmake" "3b90f67f4b429e77d3da36698cef700c" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/e81ccda615672833b578c6cefdb859ad69c560ba/ffmpeg/ffmpeg_version.cmake" "Z:/opencv/x64/3rdparty/ffmpeg"
#missing "Z:/opencv/x64/3rdparty/ffmpeg/ffmpeg_version.cmake"
#check_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake"
#mismatch_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" "d41d8cd98f00b204e9800998ecf8427e"
#delete "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake"
#cmake_download "E:/Install/opencv/opencv-3.4.10/.cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/e81ccda615672833b578c6cefdb859ad69c560ba/ffmpeg/ffmpeg_version.cmake"
#try 1
# timeout on name lookup is not supported
# getaddrinfo(3) failed for raw.githubusercontent.com:443
# Couldn't resolve host 'raw.githubusercontent.com'
# Closing connection 0

#do_unpack "ippicv_2020_win_intel64_20191018_general.zip" "879741a7946b814455eee6c6ffde2984" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip" "Z:/opencv/x64/3rdparty/ippicv"
#check_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip"
#mismatch_md5 "E:/Install/opencv/opencv-3.4.10/.cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip" "d41d8cd98f00b204e9800998ecf8427e"
#delete "E:/Install/opencv/opencv-3.4.10/.cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip"
#cmake_download "E:/Install/opencv/opencv-3.4.10/.cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip"
#try 1
# timeout on name lookup is not supported
# getaddrinfo(3) failed for raw.githubusercontent.com:443
# Couldn't resolve host 'raw.githubusercontent.com'
# Closing connection 0

原因是https://raw.githubusercontent.com网站访问不了。

解决方案以win10为例子

1:进入 IPAddress.com 网站查询raw.githubusercontent.com真实地址。

 

2:打开C:\Windows\System32\drivers\etc\hosts,(需要使用管理员权限打开)

追加199.232.68.133 raw.githubusercontent.com如下:

3:再次打开cmake如下即可:

 

参考信息如下:

https://www.ioiox.com/archives/62.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/132727
推荐阅读
相关标签
  

闽ICP备14008679号