rrtool安装失败

发布于 2021-11-22 21:22:35 字数 4925 浏览 1024 评论 1

采用源码安装rrtool失败,请指点一下。

源码安装脚本:

#!/bin/sh
BUILD_DIR=/tmp/rrdbuild
INSTALL_DIR=/opt/rrdtool-1.4.5
mkdir -p $BUILD_DIR
cd $BUILD_DIR
export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" 
#---------------------------------------------------
cd $BUILD_DIR/
tar xf pkg-config-0.26.tar.gz
cd pkg-config-0.26
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
make && make install
export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
#---------------------------------------------------
cd $BUILD_DIR/
tar xf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=$INSTALL_DIR --shared
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf libpng-1.5.11.tar.gz
cd libpng-1.5.11
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf freetype-2.4.10.tar.gz
cd freetype-2.4.10
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf libxml2-2.6.32.tar.gz
cd libxml2-2.6.32
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf pixman-0.10.0.tar.gz
cd pixman-0.10.0
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf cairo-1.6.4.tar.gz
cd cairo-1.6.4
./configure --prefix=$INSTALL_DIR 
    --enable-xlib=no 
    --enable-xlib-render=no 
    --enable-win32=no 
    CFLAGS="-O3 -fPIC"
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf gettext-0.18.1.1.tar.gz
cd gettext-0.18.1.1
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
make && make install
ln -s $INSTALL_DIR/lib/* /usr/local/lib/
ln -s $INSTALL_DIR/bin/* /usr/local/bin/
#---------------------------------------------------
cd $BUILD_DIR/
tar xf glib-2.15.4.tar.gz
cd glib-2.15.4
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
make && make install
#---------------------------------------------------
cd $BUILD_DIR/
tar xf pango-1.17.5.tar.gz
cd pango-1.17.5
./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
make && make install
#---------------------------------------------------

最后一步安装rrtool,configure怎么都不通过:

#--------------------------------------------------- 
cd $BUILD_DIR/
tar xf rrdtool-1.4.7.tar.gz
cd $BUILD_DIR/rrdtool-1.4.7
./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python

configure报错:

----------------------------------------------------------------------------
			
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of pangocairo. 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 libpangocairo-1.0 and its header files. If
  you have not installed pangocairo, you can get it either from its original home on

     http://ftp.gnome.org/pub/GNOME/sources/pango/1.28

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of pangocairo is 1.28.4.

       LIBS=-lm 
   LDFLAGS=-L/tmp/rrdbuild/lib
  CPPFLAGS=-I/tmp/rrdbuild/include -I/tmp/rrdbuild/include/fontconfig -I/tmp/rrdbuild/include/freetype2 -I/tmp/rrdbuild/include/gio-unix-2.0 -I/tmp/rrdbuild/include/glib-2.0 -I/tmp/rrdbuild/include/libpng15 -I/tmp/rrdbuild/include/libxml2 -I/tmp/rrdbuild/include/pango-1.0 -I/tmp/rrdbuild/include/pixman-1

----------------------------------------------------------------------------
                
checking for glib_check_version in -lglib-2.0... yes
checking glib.h usability... no
checking glib.h presence... no
checking for glib.h... no
checking for pkg-config... (cached) pkg-config
checking for glib_check_version in -lglib-2.0... yes
checking glib.h usability... yes
checking glib.h presence... yes
checking for glib.h... yes
checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
configure: error: Please fix the library issues listed above and try again.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘初心 2021-11-25 01:22:21

你执行下面这两个语句试试看,安装不成功的原因是依赖包没安装全。

# yum -y install pang*

# yum -y install cairo*

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文