到CMake config时,出现SSL connect error提示;
类似意思就是https://raw.githubusercontent.com/opencv/opencv_3rdparty/6152e132572dfdaa32887eabeb7199bef49b14dc/ffmpeg/opencv_videoio_ffmpeg.dll等文件下载反正是失败了;
应该是raw.githubusercontent.com网址无法访问到导致;
网上的说的修改ip试了 没用;
偶尔发现build目录里面会产生一个download_with_curl.sh的文件;
打开大概是这样的:
curl --create-dirs --output "F:/11OpenCV/opencvbuild/opencv-4.5.1/.cache/ffmpeg/37e2dadf776631acc8856e281f29cf42-opencv_videoio_ffmpeg.dll" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/6152e132572dfdaa32887eabeb7199bef49b14dc/ffmpeg/opencv_videoio_ffmpeg.dll"
curl --create-dirs --output "F:/11OpenCV/opencvbuild/opencv-4.5.1/.cache/ffmpeg/cf5dba83edf8619f57ccff4edb989c62-opencv_videoio_ffmpeg_64.dll" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/6152e132572dfdaa32887eabeb7199bef49b14dc/ffmpeg/opencv_videoio_ffmpeg_64.dll"
.......中间省略;
curl --create-dirs --output "F:/11OpenCV/opencvbuild/opencv-4.5.1/.cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat"
在网上找了一个帖子说有一个代理服务器https://ghproxy.com/
可以下载这些文件并支持命令行方式,只需要在下载的地址前加上https://ghproxy.com/
例如:
“https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat”
改为:
“https://ghproxy.com/https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat”
就可以下载了;万事具备;
修改download_with_curl.sh文件改为如下:(其实就是在每个地址前加上https://ghproxy.com/)
curl --create-dirs --output "F:/11OpenCV/opencvbuild/opencv-4.5.1/.cache/ffmpeg/37e2dadf776631acc8856e281f29cf42-opencv_videoio_ffmpeg.dll" "https://ghproxy.com/https://raw.githubusercontent.com/opencv/opencv_3rdparty/6152e132572dfdaa32887eabeb7199bef49b14dc/ffmpeg/opencv_videoio_ffmpeg.dll"
curl --create-dirs --output "F:/11OpenCV/opencvbuild/opencv-4.5.1/.cache/ffmpeg/cf5dba83edf8619f57ccff4edb989c62-opencv_videoio_ffmpeg_64.dll" "https://ghproxy.com/https://raw.githubusercontent.com/opencv/opencv_3rdparty/6152e132572dfdaa32887eabeb7199bef49b14dc/ffmpeg/opencv_videoio_ffmpeg_64.dll"
....中间省略
curl --create-dirs --output "F:/11OpenCV/opencvbuild/opencv-4.5.1/.cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" "https://ghproxy.com/https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat"
改好后的文件保存;
如果机器上装了git;
可以直接打开cmd,然后,把这个文件拖进去(如下图),回车运行,就会看到下载的界面了
等下载完成后,再在cmake中config就可以了;