源码编译rrdtool提示找不到xxx.pc类问题处理

来源:互联网 发布:淘宝卖家免费打折软件 编辑:程序博客网 时间:2024/05/29 15:29

1. 问题现象

      在Centos源码编译rrdtool 出现一系列错误信息,使用命令及报错如下图:

./configure --prefix=/usr/local/rrdtool
checking dbi/dbi.h usability... nochecking dbi/dbi.h presence... nochecking for dbi/dbi.h... nochecking rados/librados.h usability... nochecking rados/librados.h presence... nochecking for rados/librados.h... nochecking tcpd.h usability... nochecking tcpd.h presence... nochecking for tcpd.h... nochecking for glib_check_version in -lglib-2.0... nochecking for pkg-config... pkg-configconfigure: WARNING:----------------------------------------------------------------------------* I found a copy of pkgconfig, but there is no glib-2.0.pc file around.  You may want to set the PKG_CONFIG_PATH variable to point to its  location.----------------------------------------------------------------------------configure: WARNING:----------------------------------------------------------------------------* I could not find a working copy of glib-2.0. Check config.log for hints on why  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately  so that compiler and the linker can find libglib-2.0 and its header files. If  you have not installed glib-2.0, you can get it either from its original home on     ftp://ftp.gtk.org/pub/glib/2.28/  You can find also find an archive copy on     http://oss.oetiker.ch/rrdtool/pub/libs  The last tested version of glib-2.0 is 2.28.7.       LIBS=-lm    LDFLAGS=-Wl,--rpath -Wl,/usr/local/rrdtool/lib  CPPFLAGS=----------------------------------------------------------------------------                checking for g_regex_new... nochecking if pcre is available to supply the missing regex support in glib... checking now ...checking for pcre_compile in -lpcre... nochecking for pkg-config... (cached) pkg-configconfigure: WARNING:----------------------------------------------------------------------------* I found a copy of pkgconfig, but there is no pcre.pc file around.  You may want to set the PKG_CONFIG_PATH variable to point to its  location.----------------------------------------------------------------------------configure: WARNING:----------------------------------------------------------------------------* I could not find a working copy of pcre. Check config.log for hints on why  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately  so that compiler and the linker can find libpcre and its header files. If  you have not installed pcre, you can get it either from its original home on     get a newer glib and you will not need pcre at all  You can find also find an archive copy on     http://oss.oetiker.ch/rrdtool/pub/libs  The last tested version of pcre is x.x.x.       LIBS=-lm    LDFLAGS=-Wl,--rpath -Wl,/usr/local/rrdtool/lib  CPPFLAGS=----------------------------------------------------------------------------                checking for pcre_compile... noconfigure: error: you need either glib with g_regex support or libpcre to compile rrdtool.


2. 原因分析

编译时从pkg-config目录中没有找到xxx.pc文件,应该是相应xxx-devel 包没有安装

3. 处理办法

使用yum命令安装好相应devel包即可
yum install glib2-devel  pcre-devel libpng-devel  pango-devel cairo-devel  libxml2-devel



阅读全文
0 0
原创粉丝点击