PKG_CONFIG_PATH与LD_LIBRARY_PATH
2011-08-26 14:36
267 查看
转载文章《ld.so.conf文件与PKG_CONFIG_PATH》主要是因为在编译libsoup (http://git.gnome.org/browse/libsoup)
时遇到如下错误信息,而在编译libsoup之前确实下载、编译、安装过了glib (http://ftp.gnome.org/pub/GNOME/sources/glib/2.29/glib-2.29.16.tar.bz2)在/usr/local。
checking for GLIB - version >= 2.27.5... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: GLIB 2.27.5 or later is required to build libsoup
设置环境变量PKG_CONFIG_PATH之后,即export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH,得到如下错误信息:
checking for GLIB - version >= 2.27.5...
*** 'pkg-config --modversion glib-2.0' returned 2.29.16, but GLIB (2.26.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
no
configure: error: GLIB 2.27.5 or later is required to build libsoup
而在设置环境变量LD_LIBRARY_PATH之后,即export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH,则上述错误信息都消失了。于是产生了如下脚本:
#!/bin/sh
set -e
PREFIX="/usr/local"
OPT="--prefix=$PREFIX"
PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
PATH="$PREFIX/bin:$PATH"
LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
make clean distclean || true
./autogen.sh $OPT
make
sudo make install
sudo ldconfig
时遇到如下错误信息,而在编译libsoup之前确实下载、编译、安装过了glib (http://ftp.gnome.org/pub/GNOME/sources/glib/2.29/glib-2.29.16.tar.bz2)在/usr/local。
checking for GLIB - version >= 2.27.5... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: GLIB 2.27.5 or later is required to build libsoup
设置环境变量PKG_CONFIG_PATH之后,即export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH,得到如下错误信息:
checking for GLIB - version >= 2.27.5...
*** 'pkg-config --modversion glib-2.0' returned 2.29.16, but GLIB (2.26.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
no
configure: error: GLIB 2.27.5 or later is required to build libsoup
而在设置环境变量LD_LIBRARY_PATH之后,即export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH,则上述错误信息都消失了。于是产生了如下脚本:
#!/bin/sh
set -e
PREFIX="/usr/local"
OPT="--prefix=$PREFIX"
PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
PATH="$PREFIX/bin:$PATH"
LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
make clean distclean || true
./autogen.sh $OPT
make
sudo make install
sudo ldconfig
相关文章推荐
- 关于pkg-config与LD_LIBRARY_PATH与/etc/ld.so.conf文件的区别与作用
- Linux源代码编译软件及PKG_CONFIG_PATH、LD_LIBRARY_PATH、/etc/ld.so.conf、ldconfig
- pkg-config与LD_LIBRARY_PATH
- pkg-config与LD_LIBRARY_PATH
- Linux源代码编译软件及PKG_CONFIG_PATH、LD_LIBRARY_PATH、/etc/ld.so.conf、ldconfig
- openCV图像读取显示 ——pkg-config && LD_LIBRARY_PATH
- LD_LIBRARY_PATH,ldconfig,pkg-config等的作用
- Linux系统中“动态库”和“静态库”那点事儿 /etc/ld.so.conf 动态库的后缀为*.so 静态库的后缀为 libxxx.a ldconfig 目录名 谈谈Linux下动态库查找路径的问题 ldconfig LD_LIBRARY_PATH PKG_CONFIG_PATH
- 【转】pkg-config与LD_LIBRARY_PATH
- PKG_CONFIG_PATH变量 与 ld.so.conf 文件
- how to make PKG_CONFIG_PATH variable to refer an installed library?
- linux动态库路径设置(LD_LIBRARY_PATH,ldconfig)
- ldconfig及 LD_LIBRARY_PATH
- /etc/ld.so.conf & ldconfig & PKG_CONFIG_PATH[转]
- /etc/ld.so.conf 和 ldconfig和/etc/ld.so.cache和LD_LIBRARY_PATH的关系
- ld.so.conf 文件与PKG_CONFIG_PATH变量
- ldconfig及 LD_LIBRARY_PATH
- PKG_CONFIG_PATH变量 与 ld.so.conf 文件
- ld.so.conf 文件与PKG_CONFIG_PATH变量