Smokeping Can’t locate RRDs.pm in @INC 錯誤處理

由 Derek 發表於 十月 14, 2011 / 尚無評論

 

安裝完Smokeping後,在啟動服務時出現以下錯誤


[root@localhost opt]#  /usr/local/smokeping/bin/smokeping start

Can't locate RRDs.pm in @INC (@INC contains: /usr/local/smokeping/lib /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5 /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at /usr/local/smokeping/lib/Smokeping.pm line 13.

BEGIN failed–compilation aborted at /usr/local/smokeping/lib/Smokeping.pm line 13.

Compilation failed in require at /usr/local/smokeping/bin/smokeping line 8.

BEGIN failed–compilation aborted at /usr/local/smokeping/bin/smokeping line 8.

 

此錯誤表示在rrdtool安裝時,安裝不完整有缺少檔案

首先先把rrdtool重新安裝一次如下

 

[root@localhost ~]# yum install libart_lgpl-devel zlib-devel libpng-devel freetype-devel dejavu-lgc-fonts cairo-devel libxml2-devel pango-devel pango  freetype

 

[root@localhost ~]# cd /opt/

[root@localhost ~]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz

[root@localhost ~]# tar -zxvpf rrdtool-1.4.5.tar.gz

[root@localhost ~]# cd rrdtool-1.4.5

[root@localhost ~]# ./configure -prefix=/usr/local/

[root@localhost ~]# make

[root@localhost ~]# make install

[root@localhost ~]# whereis rrdtool

rrdtool: /usr/local/bin/rrdtool    #安裝完成後的路徑

 

 

再確認當初在安裝rrdtool時,所安裝的路徑。在安裝的路徑中會有

/lib/perl/5.8.8/i386-linux-thread-multi 此檔。

RRDs.pm複製到perl目錄內:


[root@localhost ]#  cp -rp /usr/local/lib/perl/5.8.8/i386-linux-thread-multi/*  /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi

 

複製過去後在重新啟動Smokeping 應該就正常了。


[root@localhost ]# /usr/local/smokeping/bin/smokeping start

Note: logging to syslog as local0/info.

Daemonizing /usr/local/smokeping/bin/smokeping …

 

 

 

 

 

 

關於作者

一個半路殺出來的傻小子,憑著一股傻勁努力的學習、嘗試、分享。希望能用自己微薄之力,替IT界和資訊界盡一點心力。單憑一己之力始終還是有限,歡迎和我有相同理念的夥伴一同加入一同努力。

評論

此文章尚無評論。

發表評論

*