gpt4 book ai didi

yum - 如何将 pkg-config 名称映射到 yum/apt-get

转载 作者:行者123 更新时间:2023-12-02 05:32:54 27 4
gpt4 key购买 nike

许多 makefile 使用 pkg-config,但名称与包管理器无关(例如 yum/apt)。如何将 pkg-config 名称映射到它们?有什么窍门吗?

示例:如果我执行 yum searchName -- 查看名称并近似于 pkg-config 的名称

结果:

$ pkg-config --libs dbus-glib-0
Package dbus-glib-0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-glib-0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-glib-0' found

$ sudo yum install dbus-glib
Loaded plugins: langpacks, refresh-packagekit
Package dbus-glib-0.100-5.fc19.i686 already installed and latest version
Nothing to do

$ sudo yum install dbus-glib-0
Loaded plugins: langpacks, refresh-packagekit
No package dbus-glib-0 available.
Error: Nothing to do

最佳答案

对于 apt-get,如果您有一些软件通过 pkg-config 提示缺少软件包,例如:

configure: error: Package requirements (gtk+-2.0 >= 2.8) were not met:No package 'gtk+-2.0' foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables GTK_CFLAGSand GTK_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.Error: Could not run ./configure, which is required to configure banshee

Then it means that the configure script is looking for the gtk+-2.0 pkgconfig package.

Then, what you can do is this:

$ sudo apt-get install apt-file...$ apt-file update...$ apt-file search gtk+-2.0 | grep "\.pc"libgtk2.0-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-2.0.pc

Which means you can install package libgtk2.0-dev:

sudo apt-get install libgtk2.0-dev

并且依赖性将得到满足。

在原始问题的特定情况下:

$ apt-file search --package-only dbus-glib-1.pc
libdbus-glib-1-dev

(dbus-glib-0 似乎太旧了,无法显示在我的系统中。)

关于yum - 如何将 pkg-config 名称映射到 yum/apt-get,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18475961/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com