Installation 如何修复柯南软件包中的库依赖性

Installation 如何修复柯南软件包中的库依赖性,installation,qt5,conan,Installation,Qt5,Conan,我正在尝试用柯南安装qt/5.14.2。 使用 我收到 ERROR: libpq/11.5: Error in package_info() method, line 211 self.cpp_info.components["pq"].requires.append("zlib::zlib") AttributeError: 'Component' object has no attribute 'requires' 好的,libpq/

我正在尝试用柯南安装qt/5.14.2。 使用

我收到

ERROR: libpq/11.5: Error in package_info() method, line 211
    self.cpp_info.components["pq"].requires.append("zlib::zlib")
    AttributeError: 'Component' object has no attribute 'requires'
好的,libpq/11.5中有一个bug

我正试图降级到

libpq/11.4@bincrafters/stable

ERROR: Conflict in qt/5.14.2@bincrafters/stable:
    'qt/5.14.2@bincrafters/stable' requires 'zlib/1.2.11' while 'libpq/11.4@bincrafters/stable' requires 'zlib/1.2.11@conan/stable'.
    To fix this conflict you need to override the package 'zlib' in your root package.
顺便说一句: 为什么仅仅要求库的正确版本和相同的存储库还不够?(对于相同的依赖性,需要在两个不同的包中包含两个不同的存储库)

好的,我试过了

zlib/1.2.11@bincrafters/stable

WARN: libpq/11.4@bincrafters/stable: requirement zlib/1.2.11@conan/stable overridden by your conanfile to zlib/1.2.11@bincrafters/stable 
zlib/1.2.11@bincrafters/stable: Not found in local cache, looking in remotes...
zlib/1.2.11@bincrafters/stable: Trying with 'conan-center'...
zlib/1.2.11@bincrafters/stable: Trying with 'minres'...
zlib/1.2.11@bincrafters/stable: Trying with 'bincrafters'...
ERROR: Failed requirement 'zlib/1.2.11@bincrafters/stable' from 'libpq/11.4@bincrafters/stable'
ERROR: Unable to find 'zlib/1.2.11@bincrafters/stable' in remotes
终于,我到了

libpq/11.4@bincrafters/stable
zlib/1.2.11@conan/stable
qt/5.14.2@bincrafters/stable
在这之后,看起来一切正常:

Installing (downloading, building) binaries...
qt/5.14.2@bincrafters/stable: Retrieving package 93c70de10405da9f2d5a1f42b8c299ca7af869d2 from remote 'bincrafters' 
Downloading conanmanifest.txt
Downloading conaninfo.txt
Downloading conan_package.tgz
....qt/5.14.2@bincrafters/stable: Package installed 93c70de10405da9f2d5a1f42b8c299ca7af869d2
qt/5.14.2@bincrafters/stable: Downloaded package revision 0
但是,安装失败

  CMake was unable to find Qt5, put qmake in your path or set
  QTDIR/QT_QMAKE_EXECUTABLE.
软件包下载后,我会在我的主目录的相应子目录中看到所有组件。但是,与其他组件不同的是,在CMake试图找到它之前,它没有安装


我做错了什么?

如果柯南有任何奇怪的行为,请升级!对我来说,使用configs clean up切换1.24.0->1.28.1修复了与libpq/11.5相同的问题

您是如何在项目中链接qt的?您是指这一行吗?特别是查找_包(Qt5组件核心网络小部件并发打印支持测试#所需的语言工具),但是您可以发布您拥有的所有cmake文件吗?请尝试
  CMake was unable to find Qt5, put qmake in your path or set
  QTDIR/QT_QMAKE_EXECUTABLE.