作者:宝丁2502907973 | 来源:互联网 | 2024-10-31 12:10
在Linux环境下编译安装Heartbeat时,常遇到依赖库缺失的问题。为确保顺利安装,建议预先通过yum安装必要的开发库,如glib2-devel、libtool-ltdl-devel、net-snmp-devel、bzip2-devel和ncurses-devel等。这些库是编译过程中不可或缺的组件,能够有效避免编译错误,确保Heartbeat的稳定运行。
安装前准备
yum -y install glib2-devel libtool-ltdl-devel net-snmp-devel bzip2-devel ncurses-devel openssl-devel libtool libxml2-devel gettext gettext-devel bison flex zlib-devel mailx which libxslt-devel docbook-dtds docbook-style-xsl PyXML shadow-utils opensp e2fsprogs-devel autoconf automake libuuid-devel instltool libaio-devel libxslt-devel gcc make pkgconfig libxml2 libuuid-devel
报错如下
libtoolize: putting libltdl files in `libltdl'.
libtoolize: `COPYING.LIB' not found in `/usr/share/libtool/libltdl
./bootstrap exiting due to error (sorry!).解决方法
yum install libtool-ltdl-devel
checking heartbeat/glue_config.h usability... no
checking heartbeat/glue_config.h presence... no
checking for heartbeat/glue_config.h... no
configure: error: in `/usr/local/heartbeat':
configure: error: Core development headers were not found
See `config.log' for more details./bootstrap exiting due to error (sorry!).解决方法
安装 glue
安装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: error: You need glib2-devel installed in order to build cluster-glue解决方法
yum install -y glib2-devel
checking for special libxml2 includes... configure: error: libxml2 config not found解决方法
yum install libxml2 libxml2-devel
configure: error: BZ2 Development headers not found解决方法
yum install -y bzip2-devel
./.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 statusgmake[2]: *** [ipctest] Error 1gmake[2]: Leaving directory `/root/Reusable-Cluster-Components-glue-1.0.6/lib/clplumbing’gmake[1]: *** [all-recursive] Error 1gmake[1]: Leaving directory `/root/Reusable-Cluster-Components-glue-1.0.6/lib’make: *** [all-recursive] Error 1解决方法
yum install e2fsprogs-devel libuuid-devel
make[2]: a2x: Command not found解决方法
yum install -y asciidoc
--xinclude \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl heartbeat.xml
error : Operation in progress
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
gmake[1]: *** [heartbeat.8] Error 4
gmake[1]: Leaving directory `/usr/local/heartbeat/doc解决方法
yum -y install docbook-style-xsl