Curl cmake无法通过协议HTTPS下载,而您拥有cmake选项过程
当我使用我的cmake选项时Curl cmake无法通过协议HTTPS下载,而您拥有cmake选项过程,curl,https,cmake,openssl,libcurl,Curl,Https,Cmake,Openssl,Libcurl,当我使用我的cmake选项时 cmake -DCMAKE_BUILD_TYPE=RELEASE \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DINSTALL_C_EXAMPLES=OFF \ -DINSTALL_PYTHON_EXAMPLES=OFF \ -DBUILD_EXAMPLES=OFF \ -DOPENCV_EXTRA_MODULES_PATH=/home/luke/cv/last/opencv_contrib/modules .. 通过HTTPS
cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DINSTALL_C_EXAMPLES=OFF \
-DINSTALL_PYTHON_EXAMPLES=OFF \
-DBUILD_EXAMPLES=OFF \
-DOPENCV_EXTRA_MODULES_PATH=/home/luke/cv/last/opencv_contrib/modules ..
通过HTTPS协议下载一些必要的文件会导致错误(写在警告中)
CMake Warning at cmake/OpenCVDownload.cmake:190 (message):
IPPICV: Download failed: 1;"Unsupported protocol"
For details please refer to the download log file:
/home/luke/cv/last/oc/opencv/build/CMakeDownloadLog.txt
是完整输出-输入的CMake命令的结果。文件中的信息:
CMakeDownloadLog.txt
图中还显示了。看起来libcurl不起作用了。好的,我安装了curl的最新版本,还安装了OpenSSL,我使用ssl制作了/configure--with-ssl
comand。当我看到配置在那里时,我可以看到协议枚举上的HTTPS。应该支持的Soo。但Cmake再次在配置和生成时仍然会失败,下载时会写入警告(如上面我的链接所示)CMake告诉:在libcurl中不支持或禁用,但libcurl表示(似乎是…)支持。啊。我正在考虑,但不知道还有什么不对
有人知道什么地方可能会出错吗?或者你有什么想法/提示吗???因为在安装最新的curl和openssl软件包之后,你仍然看到错误——甚至自己构建libcurl——我怀疑你可能已经使用它的引导程序构建了cmake 如果是这种情况,那么值得注意的是,默认情况下,cmake的
引导脚本将忽略系统包,并使用所有cmake依赖项的内部版本。不幸的是,其中包括一个不支持ssl的libcurl版本。这就是为什么它看不到您添加到系统中的版本,并且您仍然收到https不受支持或禁用的协议错误
幸运的是,bootstrap
脚本是可配置的,您可以告诉它使用各种系统库而不是内部库!以下是查看可用引导选项的方式:
cmakerepo>/bootstrap--help
它将输出如下内容:
Usage: ../bootstrap [<options>...] [-- <cmake-options>...]
Options: [defaults in brackets after descriptions]
Configuration:
--help print this message
--version only print version information
--verbose display more information
--parallel=n bootstrap cmake in parallel, where n is
number of nodes [1]
--enable-ccache Enable ccache when building cmake
--init=FILE load FILE as script to populate cache
--system-libs use all system-installed third-party libraries
(for use only by package maintainers)
--no-system-libs use all cmake-provided third-party libraries
(default)
--system-curl use system-installed curl library
--no-system-curl use cmake-provided curl library (default)
--system-expat use system-installed expat library
--no-system-expat use cmake-provided expat library (default)
--system-jsoncpp use system-installed jsoncpp library
--no-system-jsoncpp use cmake-provided jsoncpp library (default)
--system-zlib use system-installed zlib library
--no-system-zlib use cmake-provided zlib library (default)
--system-bzip2 use system-installed bzip2 library
--no-system-bzip2 use cmake-provided bzip2 library (default)
--system-liblzma use system-installed liblzma library
--no-system-liblzma use cmake-provided liblzma library (default)
--system-libarchive use system-installed libarchive library
--no-system-libarchive use cmake-provided libarchive library (default)
--system-librhash use system-installed librhash library
--no-system-librhash use cmake-provided librhash library (default)
--system-libuv use system-installed libuv library
--no-system-libuv use cmake-provided libuv library (default)
--qt-gui build the Qt-based GUI (requires Qt >= 4.2)
--no-qt-gui do not build the Qt-based GUI (default)
--qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
--sphinx-info build Info manual with Sphinx
--sphinx-man build man pages with Sphinx
--sphinx-html build html help with Sphinx
--sphinx-qthelp build qch help with Sphinx
--sphinx-build=<sb> use <sb> as the sphinx-build executable
--sphinx-flags=<flags> pass <flags> to sphinx-build executable
Directory and file names:
--prefix=PREFIX install files in tree rooted at PREFIX
[/usr/local]
--bindir=DIR install binaries in PREFIX/DIR
[bin]
--datadir=DIR install data files in PREFIX/DIR
[share/cmake-3.14]
--docdir=DIR install documentation files in PREFIX/DIR
[doc/cmake-3.14]
--mandir=DIR install man pages files in PREFIX/DIR/manN
[man]
--xdgdatadir=DIR install XDG specific files in PREFIX/DIR
[share]
一旦新构建的cmake取代了非ssl版本,那么在从源代码构建opencv时,您应该能够避免这些讨厌的下载错误(这看起来就像您正在做的一样)。。似乎CMake没有使用libcurl,而是设置为使用一些自己的lib?我在搜索它,但不知道如何设置它。或者如何确保cmake真正设置为使用我在UNIX系统中更新的libcurl。另一个类似的问题:您可以试试。
cmake-repo> mkdir build && cd build
cmake-repo/build> ../bootstrap --system-curl
cmake-repo/build> make -j<core-count> # use max cores for a fast build
cmake-repo/build> sudo make install