Total Pageviews

Saturday, 24 May 2014

pkg-config的安装

记录一下pkg-config的安装。
下载:http://pkgconfig.freedesktop.org/releases/
./configure –prefix=/usr/local/pkg-config
报错:
error: Either a previously installed pkg-config or “glib-2.0 >= 2.16″ could not be found
解决方法:
./configure –prefix=/usr/local/rrdtool –with-internal-glib
运行make,报错:
gconvert.c:66:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv
make[6]: *** [gconvert.lo] Error 1
make[6]: Leaving directory `/usr/local/pkg-config-0.28/glib/glib’
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/usr/local/pkg-config-0.28/glib/glib’
make[4]: *** [all] Error 2
make[4]: Leaving directory `/usr/local/pkg-config-0.28/glib/glib’
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/pkg-config-0.28/glib’
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/pkg-config-0.28/glib’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/pkg-config-0.28′
make: *** [all] Error 2
解决方法,重新configure一下,如下:
./configure –prefix=/usr/local/rrdtool –with-internal-glib –with-libiconv=gnu
然后再make和make install 无误。