【问题标题】:How can I install Boost Property Tree with conan?如何使用柯南安装 Boost 属性树?
【发布时间】:2019-07-25 06:59:01
【问题描述】:

我正在尝试安装 Boost 的属性树库(“boost_property_tree/1.70.0@bincrafters/stable”),但无法安装,我总是收到错误消息说它不可用:

C:\Users\RHPACHECO\Desktop\kv\CMakeBasedCore\kvcore\build (master -> origin)
(conanrunenv) λ conan install boost_property_tree/1.69.0@bincrafters/stable
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

boost_property_tree/1.69.0@bincrafters/stable: Not found in local cache, looking in remotes...
boost_property_tree/1.69.0@bincrafters/stable: Trying with 'conan-center'...
boost_property_tree/1.69.0@bincrafters/stable: Trying with 'conantest'...
ERROR: HTTPSConnectionPool(host='10.157.5.1', port=9300): Max retries exceeded with url: /v1/ping (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x04AEE3D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

Unable to connect to conantest=https://10.157.5.1:9300

我需要配置一个特定的遥控器吗?

【问题讨论】:

    标签: c++ conan


    【解决方案1】:

    您的错误是由连接错误引起的:

    错误:HTTPSConnectionPool(host='10.157.5.1',​​ port=9300):最大重试次数超过 url:/v1/ping(由 NewConnectionError('引起:无法建立新连接:[WinError 10061] 无连接)可能是因为目标机器主动拒绝了它'))

    显示的 IP 地址是本地的,这意味着柯南正在您的本地服务器(conan_server 或 Artifactory)中寻找boost_property_tree

    你可以强制一个特定的远程通过--remote

    conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
    conan install boost_property_tree/1.69.0@bincrafters/stable --remote bincrafters
    

    柯南将跳过其他遥控器并尝试在 bincrafters 的遥控器中找到boost_property_tree。这将部分解决您的问题,您需要修复本地服务器。您可以将其从远程列表中删除:

    conan remote remove conantest
    

    想了解更多关于柯南安装的信息:
    https://docs.conan.io/en/latest/reference/commands/consumer/install.html#conan-install

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-15
      相关资源
      最近更新 更多