You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows下遵循Conan 2教程消费包时遇配置及构建错误求助

Windows下Conan 2消费zlib包时的配置与构建错误

我正在遵循Conan 2官方教程进行包消费操作,Linux系统下一切正常,但Windows系统中出现报错:

ERROR: There are invalid packages:
zlib/1.2.13: Invalid: 'settings.os.subsystem' value not defined

我的默认profile是按教程执行conan profile detect --force生成的。按网上方案在profile中添加settings.os.subsystem='msys2'后,报错变为:

ERROR: There are invalid packages:
zlib/1.2.13: Invalid: 'settings.arch' value not defined

这种逐个填补配置的方式不合理,我怀疑操作有误。官方说明zlib/1.2.13支持Windows,请问问题出在哪里?


补充信息

若填补完所有配置错误后,会出现新的构建错误:

*********************************************************
Recipe 'zlib/1.2.13' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at ConanCenter的issue页面
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: zlib/1.2.13: Error in build() method, line 84
        cmake.configure()
        ConanException: Error 1 while executing

我不确定这是否是自行填补配置导致的。

内容的提问来源于stack exchange,提问作者Lorah Attkins

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 22:33:22