另一个(无法解决的)“老油条”问题

Ron*_*ald 8 dpkg pkg-config glib software-installation

我确信退伍军人知道这个练习(因为这个问题似乎已经被问了十亿次),但是我在./configure从源代码安装一个软件 ( )时遇到了这个错误:

*** 'pkg-config --modversion glib-2.0' returned 2.48.1, but GLIB (2.48.0)
*** 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
Run Code Online (Sandbox Code Playgroud)

我已经尝试了所有我发现其他线程无济于事的修复......我已经尝试了所有通常建议的PATH修改,包括但不限于:

LD_LIBRARY_PATH=/usr/local/lib
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/
PKG_CONFIG_PATH=/usr/lib/pkgconfig/
PATH=/usr/local/bin:$PATH
ACLOCAL_PATH=/usr/local/share/aclocal/
export CPATH=/usr/local/include
Run Code Online (Sandbox Code Playgroud)

以及所有可能的组合,其中有一个选项。我假设我可以运行一些诊断程序来找出我的(真实的?)glib 到底藏在哪里,以及如何将有问题的程序(或 pkg-config)指向它,但我不知道那会是什么。

在另一个类似性质的问题中建议的命令的一些输出:

find /usr/ -iname "*glib*.pc" 产量

find: ‘/usr/share/doc/google-chrome-stable’: Permission denied
/usr/lib/pkgconfig/glib-2.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/spice-client-glib-2.0.pc
Run Code Online (Sandbox Code Playgroud)

dpkg -l libglib2.0-dev产量

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  libglib2.0-dev <none>       <none>       (no description available)
Run Code Online (Sandbox Code Playgroud)

出于参考目的,我从这里和这里尝试了解决方案(从第二个线程中相当自由地使用该词):

如何解决旧的 GLIB 错误

使用jhbuild安装“pygobject”时如何解决旧的GLIB错误

和这里:

/sf/ask/785972141/

在这里和这里:

http://www.linuxquestions.org/questions/linux-newbie-8/configure-requested- “巧舌如簧-2-O-%3D-2-32-0',但-版本的,能说会道,卸载,被-2-29-2-a-4175442396/

http://ubuntuforums.org/showthread.php?t=2002738

Ubuntu 16.04,供参考......我一直在四处寻找,看起来卸载 glib 并重新安装是一个禁忌(系统过于依赖它),但现在其他一切都运行良好......我只是在挣扎安装这个新家伙。谢谢!

Win*_*nix 3

您的dpkg命令并不能捕获所有内容。尝试使用以下命令:

$ dpkg -l libglib2*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name              Version       Architecture  Description
+++-=================-=============-=============-=======================================
ii  libglib2.0-0:amd6 2.48.2-0ubunt amd64         GLib library of C routines
ii  libglib2.0-bin    2.48.2-0ubunt amd64         Programs for the GLib library
ii  libglib2.0-data   2.48.2-0ubunt all           Common files for GLib library
Run Code Online (Sandbox Code Playgroud)

尽管我的 Ubuntu 16.04 可以完美满足我的需求,但我似乎也遇到了glib与您类似的错误。我会忽略它们,因为我不需要重新安装glib

$ sudo apt install libglib2.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libglib2.0-0-refdbg' for regex 'libglib2.0'
Note, selecting 'libglib2.0-cil-dev' for regex 'libglib2.0'
Note, selecting 'libglib2.0-tests' for regex 'libglib2.0'
Note, selecting 'libglib2.0-0-dbg' for regex 'libglib2.0'
Note, selecting 'libglib2.0-bin' for regex 'libglib2.0'
Note, selecting 'libglib2.0-cil' for regex 'libglib2.0'
Note, selecting 'libglib2.0-dbg' for regex 'libglib2.0'
Note, selecting 'libglib2.0-dev' for regex 'libglib2.0'
Note, selecting 'libglib2.0-doc' for regex 'libglib2.0'
Note, selecting 'libglib2.0-data' for regex 'libglib2.0'
Note, selecting 'libglib2.0-0' for regex 'libglib2.0'
libglib2.0-0 is already the newest version (2.48.2-0ubuntu1).
libglib2.0-data is already the newest version (2.48.2-0ubuntu1).
libglib2.0-bin is already the newest version (2.48.2-0ubuntu1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libglib2.0-0-dbg : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.2-0ubuntu1 is to be installed
 libglib2.0-0-refdbg : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.2-0ubuntu1 is to be installed
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.2-0ubuntu1 is to be installed
                  Depends: libglib2.0-bin (= 2.48.0-1ubuntu4)
                  Depends: zlib1g-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

一方面,这些消息表示已安装最新版本,另一方面又表示安装了不正确的版本。最后说有包裹破损。