我是Linux(Debian)世界的新手。 Irssi需要GLib,所以我安装了2.6.6版本。在尝试./configure
Irssi时,它会给出:
...
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.
有人可以启发这笔交易吗?
答案 0 :(得分:1)
库的包被分成至少两个包 - 一个用于共享库本身,这是运行使用该库的软件所需的,另一个用于编译软件所需的额外内容,这取决于那个图书馆。在Debian中,这些包的名称是libglib-2.0
和libglib-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软件包,而不是从tar包中安装它:
sudo apt-get install irssi
除非您实际修改代码,否则您几乎不想从tarball(或git,就此而言)安装。我建议你找到你安装的任何图形包管理器 - 这个包的内容取决于Debian的版本以及你选择的桌面环境,但可能的选择是GNOME Software Center或Synaptic。