我正在尝试在Windows上用柯南构建libjpeg-turbo
软件包:
conan install libjpeg-turbo/1.5.2@bincrafters/stable
但是它失败了:
libjpeg-turbo/1.5.2@bincrafters/stable: Not found in local cache, looking in remotes...
libjpeg-turbo/1.5.2@bincrafters/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt
Downloading conanfile.py
Downloading conan_export.tgz
....
ERROR: libjpeg-turbo/1.5.2@bincrafters/stable: Error in configure() method, line 43
if self.settings.os == "Emscripten":
ConanException: Invalid setting 'Emscripten' is not a valid 'settings.os' value.
Possible values are ['Android', 'Arduino', 'FreeBSD', 'Linux', 'Macos', 'SunOS', 'Windows', 'WindowsStore', 'iOS', 'tvOS', 'watchOS']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting"
在Linux上使用相同的命令也可以。 在两个系统上,我的柯南版本均为1.21.0
我找不到有关此错误的任何线索。
编辑
这是2.0.2版安装中libjpeg-turbo的完整输出:
>conan install -r conan-center libjpeg-turbo/2.0.2@
Configuration:
[settings]
arch=x86
arch_build=x86
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
ERROR: libjpeg-turbo/2.0.2: Error in configure() method, line 49
if self.settings.os == "Emscripten":
ConanException: Invalid setting 'Emscripten' is not a valid 'settings.os
' value.
Possible values are ['Android', 'Arduino', 'FreeBSD', 'Linux', 'Macos', 'SunOS',
'Windows', 'WindowsStore', 'iOS', 'tvOS', 'watchOS']
Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-sett
ing"
答案 0 :(得分:1)
柯南软件包libjpeg-turbo/1.5.2@bincrafters/stable已过时,已由libjpeg-turbo / 2.0.2 @代替。您也可以从柯南中心获取该软件包:
conan install -r conan-center libjpeg-turbo/2.0.2@
现在了解您的错误:
ConanException:无效的设置“ Emscripten”不是有效的“ settings.os”值。
如您所见,当前的 settings.os 配置为Emscripten
,该食谱不支持。如FAQ链接所示,您应该自定义当前设置,因此可以尝试:
conan install -r conan-center libjpeg-turbo/2.0.2@ -s os=Windows
因此,您应该:
将您当前的配置文件更新到Windows:
conan profile update settings.os=Windows default
如果您确实需要Emscripten
,请向Conan Center Index请求此类功能。
致谢!