软件包 gobject-introspection-1.0 在 ubuntu 的 pkg-config 搜索路径中找不到



这是我在将项目上传到 Heroku 时遇到的错误。

remote:            running build_ext
remote:            Package gobject-introspection-1.0 was not found in the pkg-config search path.
remote:            Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
remote:            to the PKG_CONFIG_PATH environment variable
remote:            No package 'gobject-introspection-1.0' found
remote:            Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.46.0')' returned non-zero exit status 1.
remote:            
remote:            Try installing it with: 'sudo apt install libgirepository1.0-dev'
remote:            
remote:            ----------------------------------------
remote:        Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tqn048tg/PyGObject/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6agyazal-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-tqn048tg/PyGObject/
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed

我已经安装了 libgirepository1.0。 需求.txt中的包已成功安装。

首先,我会尝试安装libgirepository1.0的开发人员包。这是Linux发行版,取决于你如何实现这一目标以及开发人员包的确切名称是什么:

  • Fedora、CentOS、RHELgobject-introspection-devel
  • Debian、Ubuntu、Mint等:libgirepository1.0-dev
  • 拱门:gobject-introspection

如果这没有帮助,那么您可能会从requirements.txt中缺少一些软件包,例如:部署到 Heroku 时未找到包"gobject-introspection-1.0">

要了解您缺少什么,我们需要了解有关您的配置的更多信息。

最新更新