在Centos上安装gir1.2-gtk-3.0 [英] Installing gir1.2-gtk-3.0 on Centos

查看:131
本文介绍了在Centos上安装gir1.2-gtk-3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Ubuntu上,有一个用于安装 gir1.2-gtk-3.0 的软件包:

On Ubuntu there is a package for installing gir1.2-gtk-3.0:

sudo apt install gir1.2-gtk-3.0

Centos'dnf提供gir1 *'结果错误:未找到匹配项

Centos 'dnf provides gir1*' results in error: No Matches found

可以在> https://github.com/roojs/gir上找到该软件包-1.2-gtk-3.0 ,但没有安装脚本,只有扩展名为* .gir

The package can be found on https://github.com/roojs/gir-1.2-gtk-3.0, but there is no installation script, only files with extension *.gir

如何手动安装?

必须安装以避免出现以下情况:

The installation is necessary to avoid:

gi.require_version("Gtk","3.0")Python:命名空间Gtk不可用

gi.require_version("Gtk", "3.0") Python: Namespace Gtk not available

已经安装了其他软件包gobject-introspection,python3-gi

Other packages gobject-introspection, python3-gi are alredy installed

推荐答案

gir1.2-* 软件包用于Debian和Debian发行版.

The gir1.2-* packages are for Debian and Debian-derived distributions.

Python绑定消耗的自省数据由 typelib 文件提供,例如:

The introspection data that is consumed by the Python bindings is provided by typelib files, for instance:

/usr/lib64/girepository-1.0/Gtk-3.0.typelib

这些文件由CentOS上的库软件包以及实际的共享库提供.例如, gtk3 包提供了 Gtk-3.0.typelib 文件.

These files are provided by the library package, on CentOS, alongside the actual shared library. For instance, the Gtk-3.0.typelib file is provided by the gtk3 package.

GIR文件是API的XML描述,仅在生成自省数据时使用;它们是由CentOS上的 devel 包提供的.例如, Gtk-3.0.gir 文件由 gtk3-devel 包提供.

The GIR files are XML descriptions of the API that are only used when generating the introspection data; they are provided by the devel package, on CentOS. For instance, the Gtk-3.0.gir file is provided by the gtk3-devel package.

如果pygobject无法找到 typelib 文件,则可能是您已将其安装在某些非标准位置.您必须使用 GI_TYPELIB_PATH 环境变量来列出所有可能找到typelib数据的位置,并以冒号分隔的路径列表.

If pygobject cannot find the typelib file, it's likely that you've installed it in some non-standard location. You must use the GI_TYPELIB_PATH environment variable to list all the locations where the typelib data might be found, as a colon-separated list of paths.

这篇关于在Centos上安装gir1.2-gtk-3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆