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

1. 问题现象

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

./configure --prefix=/usr/local/rrdtool
checking dbi/dbi.h usability... no
checking dbi/dbi.h presence... no
checking for dbi/dbi.h... no
checking rados/librados.h usability... no
checking rados/librados.h presence... no
checking for rados/librados.h... no
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for glib_check_version in -lglib-2.0... no
checking for pkg-config... pkg-config
configure: 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... no
checking if pcre is available to supply the missing regex support in glib... checking now ...
checking for pcre_compile in -lpcre... no
checking for pkg-config... (cached) pkg-config
configure: 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... no
configure: 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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值