本文档翻译自:https://docs.conan.io/en/latest/reference/commands/misc/download.html
$ conan download [-h] [-p PACKAGE] [-r REMOTE] [-re] reference
将配方和二进制文件下载到本地缓存,而无需使用设置。
它可以有效地指定要安装的配方参考和软件包ID。 不是传递性的,将不会检索指定参考的要求。 与“柯南副本”一起使用时,可以自动将软件包升级为其他用户/渠道。 只有指定了引用,它才会从指定的远程下载所有软件包。 如果未指定任何远程,它将使用默认的远程。
positional arguments:
reference pkg/version@user/channel
optional arguments:
-h, --help show this help message and exit
-p PACKAGE, --package PACKAGE
Force install specified package ID (ignore
settings/options) [DEPRECATED: use full reference
instead]
-r REMOTE, --remote REMOTE
look in the specified remote server
-re, --recipe Downloads only the recipe
Examples
从远程foo下载所有 openssl/1.0.2u 二进制软件包:
$ conan download openssl/1.0.2u@ -r foo
从远程foo下载一个单独的openssl/1.0.2u二进制软件包:
$ conan download openssl/1.0.2u@:8018a4df6e7d2b4630a814fa40c81b85b9182d2 -r foo
仅从远程foo下载包openssl/1.0.2u的配方:
$ conan download openssl/1.0.2u@ -r foo -re