【问题标题】:HTTPSConnectionPool error when trying to install gtest with conan尝试使用柯南安装 gtest 时出现 HTTPSConnectionPool 错误
【发布时间】:2021-12-11 14:32:39
【问题描述】:

我正在尝试使用 conan 安装 gtest,但是当我这样做时出现以下错误:

gtest/1.11.0: Not found in local cache, looking in remotes...
gtest/1.11.0: Trying with 'conancenter'...
ERROR: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

Unable to connect to conancenter=https://center.conan.io
1. Make sure the remote is reachable or,
2. Disable it by using conan remote disable,
Then try again.

但是我不确定为什么它不起作用
包确实存在 (https://conan.io/center/gtest)
而且我也在使用柯南安装其他软件包,我对它们没有任何问题

我的完整 conanfile 看起来像这样:

[requires]
libcurl/7.78.0
cjson/1.7.15
gtest/1.11.0

[options]
openssl:shared=True

[generators]
cmake

有人知道我为什么会出现这个错误吗?
我在 Windows 11 上使用柯南 1.37.0

【问题讨论】:

    标签: c++ cmake googletest conan


    【解决方案1】:

    此错误与已弃用的证书有关。

    这里讨论过:https://github.com/conan-io/conan/issues/9695

    总而言之,您有两种选择:

    • 将您的柯南客户端更新到 >= 1.41.0(最佳解决方案):

      pip install -U conan

    • 安装新证书(解决方法):

      conan config install https://github.com/conan-io/conanclientcert.git

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-03
      • 1970-01-01
      相关资源
      最近更新 更多