Chinaunix首页 | 论坛 | 博客
  • 博客访问: 327757
  • 博文数量: 81
  • 博客积分: 2107
  • 博客等级: 大尉
  • 技术积分: 742
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-30 09:38
文章分类

全部博文(81)

文章存档

2011年(2)

2010年(28)

2009年(45)

2008年(6)

我的朋友

分类: LINUX

2010-01-20 10:41:09

编译安装cacti-spineSRPM包问题

  • tip 声明:本文系原创,欢迎非盈利目的的转载,转载请注明文章来源和作者(杨方)信息

问题描述

  • 环境 CentOS5.3
  • 情景 如果是CentOS5.2的net-snmp包配合dag库里的cacti-spine-0.8.7a-1.el5.rf.x86_64.rpm就天衣无缝了,偏偏5.3里升级过net-snmp的包,从5.3.1升级到5.3.2.2,这样再安装spine rpm后会成功,执行spine命令却会报错“SPINE: Poller[0] ERROR: SNMP Library Version Mismatch (5.3.1 vs 5.3.2.2) (Spine parent) ”。于是我们就只有两个选择,要么降级net-snmp相关所有的rpm包,可能包括net-snmp, net-snmp-libs, net-snmp-utils, net-snmp-devel;要么就手工编译spine源码。前一种方案很容易在下一次升级后失败,或者引起其他兼容问题,所以我选用了第二种,很简单的下载到了,接下来就是rebuild过程中发生的缺包问题。

问题原因

  • 因为是很干净的系统,很多常用的lib和工具软件都没有装,所以就一个一个补上了。

# 如果你没有装过rpmbuild,先执行yum install rpm-build
[root@server src]# rpmbuild --rebuild cacti-spine-0.8.7a-1.rf.src.rpm
...............
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd cacti-spine-0.8.7a
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/perl -pi.orig -e 's|/lib\b|/lib64|g' configure
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.71585
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd cacti-spine-0.8.7a
+ autoreconf --force --install --symlink
/var/tmp/rpm-tmp.71585: line 25: autoreconf: command not found
error: Bad exit status from /var/tmp/rpm-tmp.71585 (%build)


RPM build errors:
    user dag does not exist - using root
    group dag does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.71585 (%build)

# 以上问题解决方案
[root@server src]# yum install autoconf

# 再次尝试
[root@server src]# rpmbuild --rebuild cacti-spine-0.8.7a-1.rf.src.rpm
..............
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd cacti-spine-0.8.7a
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/perl -pi.orig -e 's|/lib\b|/lib64|g' configure
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.85273
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd cacti-spine-0.8.7a
+ autoreconf --force --install --symlink
Can't exec "aclocal": No such file or directory at /usr/bin/autoreconf line 174.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 174.
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 288.
autoreconf: failed to run aclocal: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.85273 (%build)


RPM build errors:
    user dag does not exist - using root
    group dag does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.85273 (%build)
	
# 以上问题解决方案
[root@server src]# yum install automake

# 再次尝试
[root@server src]# rpmbuild --rebuild cacti-spine-0.8.7a-1.rf.src.rpm
..............
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd cacti-spine-0.8.7a
+ autoreconf --force --install --symlink
configure.ac:69: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
error: Bad exit status from /var/tmp/rpm-tmp.74325 (%build)


RPM build errors:
    user dag does not exist - using root
    group dag does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.74325 (%build)

# 以上问题解决方案
[root@server src]# yum install libtool

# 再次执行,好了,没有报错
# 接下来安心装我的新鲜出炉的rpm了
[root@server src]# rpm -ivh /usr/src/redhat/RPMS/x86_64/cacti-spine-0.8.7a-1.rf.x86_64.rpm
阅读(1633) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~