我从源代码安装了 glib2.42,但这给我带来了问题。所以我尝试降级它make uninstall
,然后安装 glib2.28。但现在当我尝试使用 glib 依赖项构建软件时,它会显示此错误:
*** 'pkg-config --modversion glib-2.0' returned 2.28.8, but GLIB (2.42.1)
*** 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
configure: error: Cannot find GLIB: Is pkg-config in your path?
我该如何解决这个问题并保留 gib2.28?
答案1
试试答案这里建议使用以下命令:
echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib