1

我是 Linux (Debian) 世界的新手。Irssi 需要 GLib,所以我安装了 2.6.6 版本。尝试./configureIrssi 时,它给出:

...
checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.6.0...
*** 'pkg-config --modversion glib-2.0' returned 2.6.6, but GLIB (2.32.4)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
*** trying without -lgmodule
checking for pkg-config... (cached) /usr/local/bin/pkg-config
checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.6.0...
*** 'pkg-config --modversion glib-2.0' returned 2.6.6, but GLIB (2.32.4)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no

*** If you don't have GLIB, you can get it from ftp://ftp.gtk.org/pub/glib/
*** We recommend you get the latest stable GLIB 2 version.
*** Compile and install it, and make sure pkg-config finds it,
*** by adding the path where the .pc file is located to PKG_CONFIG_PATH

configure: error: GLIB is required to build irssi.

有人能解释一下这是怎么回事吗?

4

1 回答 1

1

库的包至少分为两个包——一个用于共享库本身,这是运行使用该库的软件所需要的,另一个用于编译依赖于该库的软件所需的额外内容。在 Debian 中,这些软件包的名称是libglib-2.0libglib-2.0-dev

你已经libglib-2.0安装了 2.32.2 版本,但是为了编译像 irssi 这样的软件,你需要libglib-2.0-dev. 正确的做法是安装该软件包:

sudo apt-get install libglib-2.0-dev

不幸的是,像您一样安装一个古老版本的 glib(2.6.6 于 2005-08-01 发布)可能已经严重破坏了您的系统,因为它很可能其他软件依赖于更新版本的 glib。如果您没有将任何参数传递给./configure它可能已安装到/usr/local中,这会很好,因为它可能没有覆盖您需要的任何内容/usr(这是安装打包版本的位置)。因此,您可以直接进入编译 2.6.6 的目录并运行:

sudo make uninstall

您可能还想从 Debian 重新安装软件包:

sudo apt-get install --reinstall libglib-2.0

我不知道您想用 irssi 做什么,但您可能只想使用 Debian 软件包,而不是从 tarball 安装它:

sudo apt-get install irssi

除非您实际上正在修改代码,否则您几乎从不想从 tarball(或 git,就此而言)进行安装。我建议你找到你安装的任何图形包管理器——那个包是什么取决于 Debian 的版本以及你选择的桌面环境,但可能的选择是 GNOME 软件中心或 Synaptic。

于 2014-08-15T02:24:34.937 回答