[精讚] [會員登入]
1487

[CENTOS7] 安裝rrdtool+RRDs+PERL

要讓perl繪圖,安裝rrdtool和RRDs

分享此文連結 //n.sfs.tw/13060

分享連結 [CENTOS7] 安裝rrdtool+RRDs+PERL@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2022-01-07 15:07:36 最後編修
2019-01-29 03:11:37 By 張○○
 

自動目錄

要讓perl繪圖,安裝rrdtool和RRDTool::OO,安裝的過程記錄,有一些困難也排除

CENTOS7+ PERL+ RRDTOOL+ RRDTool::OO(for PERL)

下載

CENTOS8 可以直接 dnf install rrdtool

如果要使用tarball 來裝的話,請到下方連結下載。

https://oss.oetiker.ch/rrdtool/pub/?M=D

安裝及解壓到目錄,進到目錄(略)

 

 

組態

# ./configure

執行出現以下錯誤:

* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.

* I found a copy of pkgconfig, but there is no glib-2.0.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.

* I found a copy of pkgconfig, but there is no libpng.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.

* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.
----------------------------------------------------------------------------

從[1]得來的建議,要裝以下套件

# yum install libxml2*
# yum install glib2*
# yum install libpng*

# yum install libpango* (不確定這個要不要?)

# yum install libcairo* (不確定這個要不要?)

裝完這個錯誤依舊

* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.

上面的錯誤顯然是 pango和cairo這兩個套件,但我裝了又沒作用,但我不確定libcairo, libpango要不要。

爬文花了不少時間,後來發現[2]最後說到的重點,要裝這兩個套件:

# yum install cairo-devel
# yum install pango-devel

裝完組態就過了,感謝他們!

 

編譯及安裝

# make

# make install clean

裝好的程式放在 /opt/rrdtool-1.7.0/

 

PERL 如何使用?

原本找到[3] 所寫的 RRDTool::OO模組,以為可以使用,但是安裝時出現

This module requires rrdtool 1.2.x and the RRDs module to be
installed. They are available in the rrdtool distribution:
 http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz

他說要rrdtool 1.2.x版,我目前是1.7.0版,無論你按y或n都會失敗。

換句話說,在PERL中你不能使用這個套件,只能用1.7版提供的功能。

在PERL中,只要指定pm檔的目錄

 use lib qw( /opt/rrdtool-1.7.0/lib/perl/5.16.3/ );
 use RRDs;

後來發現,可以直接裝 rrdtool-perl

# yum install rrdtool-perl

這樣子安裝完就能直接use RRDs,不必再加 lib路徑~~

呿!怎麼不早說?

還是有差異,這樣子裝好的版本是 1.4.x版。

就看各位想用什麼版本了。

祝您寫程愉快~~

 

參考資料

[1] https://ubuntuforums.org/showthread.php?t=1112365

[2] https://wwangcg.iteye.com/blog/1408328

[3] https://metacpan.org/pod/RRDTool::OO

END

你可能感興趣的文章

DNS壓力測試工具queryperf 要怎麼知道我安裝的DNS是否能耐受的住網路上的攻擊或大量查詢,這裡有一個免費的工具 queryperf

使用mutt發信(LINUX直接寄信) mutt是一個簡易的發送程式,學會他就不用每次telnet mail server 煩死人

[Centos7] HTTPS/SSL憑證的SELINUX設置 把申請來的憑證檔放到指定的位置後,沒辦法啟動,怎麼辦?

Centos7 安裝 docker-composer 及使用 docker compose 是使用docker的利器,可以讓很多的指令用文檔的方式載入。

動態DNS -- dynamic DNS實作 BIND9動態DNS設定

使用dnstop 來觀察dns運作的情形 dnstop是非常方便的工具,可以觀察即時的dns查詢。 安裝 yum install dnstop

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

世紀帝國征服者新版本--被遺忘的帝國 世紀帝國征服者新版本--被遺忘的帝國 世紀二代的征服者是精典遊戲中的精典,aofe更好玩...

外匯課程經驗 有天遇到某個朋友的正妹朋友,說她有個很棒的外匯投資課程,要我們去聽,只收場地費200大洋。她又說續效最差一個月也有1%,誰還在苦哈哈上班?

[CodeIgniter 3] 資料庫的使用方法整理1/2 --Select的使用 [CodeIgniter 3] 資料庫的使用方法整理:Select的使用

維修海棉拖把頭 這類型的海棉拖把很好用,可是這近發現海棉頭越來越不耐用,也許是錯覺,以往都能用個三四個月,現在二個月就差不多掉下來。 這

分享還是炫耀? 是分享還是炫耀,取決於對方的的心態和你的心態...