[英]conan install fails on name and version field
relevant files: . ├── bin ├── src ├── conanfile.py └── gcc-9.3.0-linux-x86-debug.profile
相关文件: . ├── bin ├── src ├── conanfile.py └── gcc-9.3.0-linux-x86-debug.profile
. ├── bin ├── src ├── conanfile.py └── gcc-9.3.0-linux-x86-debug.profile
When trying to run the following command from the bin folder, I get the error that the name and the version field is not found in the profile.尝试从 bin 文件夹运行以下命令时,我收到错误,即在配置文件中找不到名称和版本字段。 $ conan install.. --profile../gcc-9.3.0-linux-x86-debug.profile ERROR: Error reading '../gcc-9.3.0-linux-x86-debug.profile' profile: Specify the 'name' and the 'version'
But if I understand it correctly, the version and name should be defined in the conanfile.py file.但是如果我理解正确的话,版本和名称应该在 conanfile.py 文件中定义。 Where would I define missing name and version number for the install command?我将在哪里为安装命令定义缺少的名称和版本号?
Relevant conan profile相关柯南简介
[build_requires]
cmake
ninja
gcc/9.3.0
g++/9.3.0
xorriso
qemu
[settings]
os=Linux
os_build=Linux
arch=x86
arch_build=x86
compiler=gcc
compiler.version=9.3.0
cppstd=17
build_type=Debug
[options]
[env]
CC=/usr/bin/gcc-9.3.0
CXX=/usr/bin/g++-9.3.0
CFLAGS=-g
CXXFLAGS=-g
You need to specify the version too in the [build_requires]
(same in conanfile.txt
and conanfile.py
files).您还需要在[build_requires]
中指定版本(在conanfile.txt
和conanfile.py
文件中相同)。 Specifying only the name is not valid syntax.仅指定名称不是有效的语法。 So something like:所以像:
[build_requires]
cmake/3.16.4
If you need it, version ranges are possible, something like cmake/[>3.15]
for example should work.如果您需要它,版本范围是可能的,例如cmake/[>3.15]
之类的东西应该可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.