Step 1: We can search for a specific string before installing from the upstream registry and install accordingly. To search for conan package, use below command:
conan search "*" -r=<repo-name>
Example:
$ conan search “units” -r=conan-virtual
This command gives the list of the matching packages that are available upstream. Below is the output for conan search package for the string “units”
conan-virtual units units/2.3.1 units/2.3.3
After the above search,below is an example to install units 2.3.1.
Step 2: To resolve the conan package in 2.0 version, you can use below command:
This example illustrates on how to pull packages from remote upstream registry where my conan-remote repository is pointing to default url “”
$ conan install --requires=<recipe>/<version> -r=<repo-name>
Example:
$ conan install --requires=units/2.3.1 -r=conan-virtual --build=units/2.3.1
======== Input profiles ======== Profile host: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=14 os=Macos Profile build: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=14 os=Macos ======== Computing dependency graph ======== Graph root cli Requirements units/2.3.1#358e7e8a06c3db55f843287d096501b8 - Cache ======== Computing necessary packages ======== units/2.3.1: Forced build from source Requirements units/2.3.1#358e7e8a06c3db55f843287d096501b8:da39a3ee5e6b4b0d3255bfef95601890afd80709 - Build ======== Installing packages ======== units/2.3.1: Calling source() in /Users/<..>/.conan2/p/units03c48edb5c177/s Downloading v2.3.1.tar.gz -------- Installing package units/2.3.1 (1 of 1) -------- units/2.3.1: Building from source units/2.3.1: Package units/2.3.1:da39a3ee5e6b4b0d3255bfef95601890afd80709 units/2.3.1: Building your package in /Users/rohithb/.conan2/p/t/units29dd155f4f5ec/b units/2.3.1: Generating aggregated env files units/2.3.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] units/2.3.1: Calling build() units/2.3.1: Package 'da39a3ee5e6b4b0d3255bfef95601890afd80709' built units/2.3.1: Build folder /Users/rohithb/.conan2/p/t/units29dd155f4f5ec/b units/2.3.1: Generating the package units/2.3.1: Temporary package folder /Users/rohithb/.conan2/p/t/units29dd155f4f5ec/p units/2.3.1: Calling package() units/2.3.1: package(): Packaged 1 file: LICENSE units/2.3.1: package(): Packaged 1 '.h' file: units.h units/2.3.1: Created package revision d697164a216b81e5ae7443259d84c4d4 units/2.3.1: Package 'da39a3ee5e6b4b0d3255bfef95601890afd80709' created units/2.3.1: Full package reference: units/2.3.1#358e7e8a06c3db55f843287d096501b8:da39a3ee5e6b4b0d3255bfef95601890afd80709#d697164a216b81e5ae7443259d84c4d4 units/2.3.1: Package folder ======== Finalizing install (deploy, generators) ======== cli: Generating aggregated env files cli: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] Install finished successfully