对于Heartbeat真可谓是错综复杂,过程充满各种曲折的错误,这里像大家列出我在RHEL-6.1/5.4下安装过程中所碰到的一些错误和解决方法以方便友友参考:
Heartbeat-3.X版本以后被分为了4个模块,这些安装包都可以从官网:
http://www.linux-ha.org/wiki/Downloads下载得到:
目前的这些版本是:
ClusterLabs-resource-agents-v3.9.2-0-ge261943.tar.gz
Heartbeat-3-0-7e3a82377fa8.tar.bz2
pacemaker-1.1.9-1512.el6.src.rpm
Reusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
解压Reusable-Cluster-Components-glue--glue-1.0.9.tar.bz2
进入到该目录:./autogen.sh
./configure
make && make install
可能会出现的错误:
(1).You must have autoconf installed to compile the cluster-glue package
解决办法:说明机器上面没有相应的环境
yum install autoconf automake autoheaderaclocal
or
wget ftp://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
(2). You must have libtoolinstalled to compile the cluster-glue package
解决办法:说明机器上面没有相应的环境
yum install libtool
or
wget ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
(3) ./autogen.sh时出现libtoolize: `COPYING.LIB' not found in`/usr/share/libtool/libltdl'
解决办法:yum install libtool-ltdl-devel
-----------------------------------------------------------------
安装Reusable-Cluster-Components-glue--glue-1.0.9 ./.libs/libplumb.so: undefined reference to `uuid_parse’ ./.libs/libplumb.so: undefined reference to `uuid_generate’ ./.libs/libplumb.so: undefined reference to `uuid_copy’ ./.libs/libplumb.so: undefined reference to `uuid_is_null’ ./.libs/libplumb.so: undefined reference to `uuid_unparse’ ./.libs/libplumb.so: undefined reference to `uuid_clear’ ./.libs/libplumb.so: undefined reference to `uuid_compare’ collect2: ld returned 1 exit status gmake[2]: *** [ipctest] Error 1 gmake[2]: Leaving directory`/root/Reusable-Cluster-Components-glue-1.0.6/lib/clplumbing’ gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory`/root/Reusable-Cluster-Components-glue-1.0.6/lib’ make: *** [all-recursive] Error 1 解决办法: ./configure --prefix=$PREFIX --with-daemon-user=${CLUSTER_USER}--with-daemon-group=${CLUSTER_GROUP} --enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1'
各位在./configure的时候指定一下LIBS,如果是32位系统的话改成LIBS='/lib/libuuid.so.1'。下面ClusterLabs-resource Heartbeat在./configure的时候都指定一下,要不然继续报错。
--------------------------------------------------------------------------
./configure时出现configure: error:BZ2 libraries not found
解决办法:yum -yinstall bzip2-devel glib2-devel
-----------------------------------------------------------------------------
6.make时出现 lib/pils/.libs/libpils.so -lbz2 -lxml2 -lc -lrt -ldl -lglib-2.0 -lltdl
./.libs/libplumb.so: undefined reference to `uuid_parse'
./.libs/libplumb.so:undefined reference to `uuid_generate'
./.libs/libplumb.so: undefined referenceto `uuid_copy'
./.libs/libplumb.so: undefined reference to `uuid_is_null'
./.libs/libplumb.so: undefined reference to `uuid_unparse'
./.libs/libplumb.so:undefined reference to `uuid_clear' ./.libs/libplumb.so: undefined reference to`uuid_compare'
collect2: ld returned 1 exit status
gmake[2]: *** [ipctest]Error 1
解决办法:yum install e2fsprogs-devel libuuid-devel
--------------------------------------------------------------- make时出现
error :Operation in progress warning: failed to load external entity
"http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl"compilation error: filehttp://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl line 46element include
xsl:include : unable toload http://docbook.sourceforge.net/release/xsl/current/html/formal.xslhttp://docbook.sourceforge.net/release/xsl/current/html/table.xsl:1: parsererror : Document is empty http://docbook.sourceforge.net/release/xsl/current/html/table.xsl:1:parser error : Start tag expected, '<' not found compilation error: file http://docbook.sourceforge.net/release/xsl/current/html/docbook.xslline 47 element include xsl:include :unable to loadhttp://docbook.sourceforge.net/release/xsl/current/html/table.xsl
解决办法:一些文档需要到互联网上去下,目前为止make过程中除了doc没有安装外,其他的都已经成功安装了,所以该问题可以忽略。 PS:这个问题在make install时也会出现,应该没有下载下来,所以也无法安装了,可以忽略掉。(其实这个时候可以根据耐心多安装几次,之所以安装失败就是因为没有下载下来,可以多尝试几次)
---------------------------------------------------------------------------------
安装Heartbeat-3-0-7
uuid_parse.c:250: error: expected ‘;’, ‘,’ or ‘)’ before ‘uu’ uuid_parse.c:469: error: expected ‘)’ before ‘out’ uuid_parse.c:484: error: expected ‘)’ before ‘out’ uuid_parse.c:512: error: expected ‘)’ before ‘out’ gmake[1]: *** [uuid_parse.lo] Error 1 gmake[1]: Leaving directory `/usr/src/Heartbeat-3-0-7e3a82377fa8/replace' make: *** [all-recursive] Error 1
解决办法: ./configure --prefix=$PREFIX --enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1'
gmake[1]: --xinclude: Command not found gmake[1]: *** [heartbeat.8] Error 127 gmake[1]: Leaving directory `/usr/src/Heartbeat-3-0-7e3a82377fa8/doc' make: *** [all-recursive] Error 1
解决办法: # yum -y install libxslt-devel