LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 856|回复: 3

求助:mrtg问题

[复制链接]
发表于 2003-6-17 17:59:03 | 显示全部楼层 |阅读模式
按照http://www.linuxsir.cn/forum.php ... 装mrtg,在输入
./indexmaker --output=/var/www/html/mrtg/net/index.html --title=Sonic /var/www/html/mrtg/mrtg.cfg
后出现如下错误:
Possible precedence problem on bitwise | operator at /usr/bin/../lib/mrtg2/BER.pm line 601.
Can't locate package $VERSION for @MRTG_lib::ISA at ./indexmaker line 49
        main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
        eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
其中mrtg.cfg文件如下:
# Created by
# /usr/bin/cfgmaker --output=/var/www/html/mrtg/mrtg.cfg public@210.41.84.72


### Global Config Options

#  for UNIX
WorkDir: /var/www/html/mrtg/

#  or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
#  Options[_]: growright, bits
#  Language:GB2312


######################################################################
# System: landk
# Description: Linux landk 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686
# Contact: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
# Location: Unknown (edit /etc/snmp/snmpd.conf)
######################################################################
发表于 2003-6-18 19:45:24 | 显示全部楼层
debian/gentoo都实验了,没这个问题

下载不同的版本 ./configure && make && make install 呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2003-6-18 21:00:24 | 显示全部楼层
建议重装Mrtg,应该是perl模块路径的问题
发表于 2003-10-31 12:21:28 | 显示全部楼层
RedHat Version 9.0 / 8.0 and Indexmaker
RedHat versions 8 and 9 give an error like this when running indexmaker.



[root@bigboy mrtg]# indexmaker --output=index.html /etc/mrtg/localhost.cfg
Can't locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
[root@bigboy mrtg]#



This is caused by an incompatibility between MRTG and PERL 5.8 which MRTG uses to generate files. The MRTG site claims this was fixed in version 2.9.22, but this version of MRTG seems to fail under RedHat.

The fix is simple:

· Edit the file /usr/lib/mrtg2/MRTG_lib.pm

· Replace the line:

@ISA = qw(Exporter $VERSION);

with

@ISA = qw(Exporter);

· Run indexmaker again.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表