python - 在 ubuntu 的 pkg-config 搜索路径中找不到包 gobject-introspection-1.0
问题描述
这是我将项目上传到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('\r\n', '\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。requirements.txt 中的包已成功安装。
解决方案
首先,我会尝试安装libgirepository1.0
. 那是 Linux 发行版,取决于您如何实现这一目标以及开发人员包的确切名称是什么:
- Fedora、CentOS、RHEL等:gobject-introspection-devel
- Debian、Ubuntu、Mint等:libgirepository1.0-dev
- Arch:gobject-introspection
如果这没有帮助,那么您可能会丢失一些包requirements.txt
,例如:No package 'gobject-introspection-1.0' found while deploying to Heroku
要知道您缺少什么,我们需要更多地了解您的配置。
推荐阅读
- python - 事务回滚
- node.js - 使用 Yarn 从另一个脚本调用一个脚本
- kotlin - 引用定义为成员的扩展函数;内联`with`
- laravel-6 - 重定向到嵌套控制器操作
- react-native - 使用 react-native-firebase-mlkit 视觉处理 OCR 图像后如何绘制边界框
- c - 在 PIC18F252 上与 ADC 的输出作斗争
- c++ - 为什么不允许将临时对象绑定到非常量引用?
- .net - 在 WPF 中向 DatePicker 控件添加按钮
- php - 接口常量,后期静态绑定
- mongodb - MongoDB TTL/ExpireAfterSeconds 行为不端,在给定时间后未删除所有数据