共计 4932 个字符,预计需要花费 13 分钟才能阅读完成。
对于 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
推荐阅读 :
Linux 高可用(HA)集群之 heartbeat 基于 crm 进行资源管理详解 http://www.linuxidc.com/Linux/2013-08/89167.htm
Heartbeat+httpd+NFS 实现高可用的 Web 服务器 http://www.linuxidc.com/Linux/2013-08/88520.htm
Linux 高可用(HA)集群之 Heartbeat 详解 http://www.linuxidc.com/Linux/2013-08/88521.htm
Linux 高可用性方案之 Heartbeat 的 CRM 配置 http://www.linuxidc.com/Linux/2012-05/60838.htm
高可用集群 Heartbeat v1 实例 http://www.linuxidc.com/Linux/2013-09/90757.htm
LVS+heartbeat+ldirectord 高可用负载均衡集群解决方案 http://www.linuxidc.com/Linux/2011-09/42911.htm