rrdtool命令錯誤,libpng12.so.0: no version information available
執行rrdtool命令時出現錯誤提示如下:
[root@BKMonitor002 ~]# /usr/local/rrdtool/bin/rrdtool
/usr/local/rrdtool/bin/rrdtool: /lib/libpng12.so.0: no version information available (required by /usr/local/rrdtool/lib/librrd.so.2)一開始通過google四處搜尋解決方案,還別說,這類問題還真不好,google一搜就是一大把,而且說什麼的都有。三思先是通過yum安裝的rrdtool 1.2.27版本,看到網上有說要升級rrdtool版本到1.4的,有說要重新編譯安裝高版本libpng/libart_lgpl等依賴包的,有說要通過原始碼編譯方式安裝的,等等吧。可惜,這些方式不給力啊,按照各種說明配置了一下午,嘗試了各種組合,最後我感覺腦袋都編譯暈了,問題還是沒解決~~
這倒不是定是它們說的不靠譜,我感覺主要應該還是實際情況有差異,比如系統版本,依賴包的版本等,當然也有可能是三思沒能試到正確的組合。最終未果的情況下,三思決定來看看這個libpng12.so.0到底是怎麼回事。找一個與之環境類似的伺服器做對比,拿ldd檢視其依賴的動態連結庫究竟有什麼差異,先找了一臺rrdtool工作正常的伺服器,執行命令如下:
[root@BKMonitor001 ~]# ldd /usr/local/rrdtool/bin/rrdtool
librrd.so.2 => /usr/local/rrdtool/lib/librrd.so.2 (0x00002adae2f11000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003b90200000)
libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003aa6800000)
libz.so.1 => /usr/lib64/libz.so.1 (0x0000003b8da00000)
libart_lgpl_2.so.2 => /usr/lib64/libart_lgpl_2.so.2 (0x0000003aace00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b8d600000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b8ca00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b8c600000)
而後再到出問題的伺服器上執行相同語句注意了,報錯資訊馬上就要出來了:
[root@BKMonitor002 ~]# ldd /usr/local/rrdtool/bin/rrdtool
/usr/local/rrdtool/bin/rrdtool: /lib/libpng12.so.0: no version information available (required by /usr/local/rrdtool/lib/librrd.so.2)
librrd.so.2 => /usr/local/rrdtool/lib/librrd.so.2 (0x00002b481bdb1000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003b90200000)
libpng12.so.0 => /lib/libpng12.so.0 (0x00002b481c013000)
libz.so.1 => /usr/lib64/libz.so.1 (0x0000003b8da00000)
libart_lgpl_2.so.2 => /usr/lib64/libart_lgpl_2.so.2 (0x0000003eae800000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b8d600000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b8ca00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b8c600000)
兩相對比,我cow,libpng12.so.0檔案路徑不一致,連結的實際檔案也不同啊,檢視一下檔案的資訊:
[root@BKMonitor001 ~]# ll /usr/lib64/libpng12.so.0*
lrwxrwxrwx 1 root root 18 Nov 30 07:47 /usr/lib64/libpng12.so.0 -> libpng12.so.0.10.0
-rwxr-xr-x 1 root root 149344 Jul 15 2010 /usr/lib64/libpng12.so.0.10.0
lrwxrwxrwx 1 root root 19 Nov 30 11:28 /lib/libpng12.so.0 -> libpng12.so.0.1.2.8
-rwxr-xr-x 1 root root 262576 Nov 30 11:28 /lib/libpng12.so.0.1.2.8
libpng12.so.0是個軟連結,兩臺機器上的實際指定檔案也不一樣,看到這種情況,三思下意識的想法是死馬當成活馬醫,直接拿工作正常的機器中libpng12.so.0替換。通過sftp命令在兩臺機器上傳輸檔案,而後覆蓋檔案:
[root@BKMonitor002 ~]# mv /lib/libpng12.so.0 /lib/libpng12.so.0.bak
[root@BKMonitor002 ~]# cp /home/jss/libpng12.so.0.10.0 /lib/libpng12.so.0
再次嘗試執行rrdtool
[root@BKMonitor002 ~]# rrdtool create
RRDtool 1.2.27 Copyright 1997-2008 by Tobias Oetiker
Compiled Apr 6 2008 00:00:25
Usage: rrdtool [options] command command_options
* create - create a new RRD
rrdtool create filename [--start|-b start time]
[--step|-s step]
[DS:ds-name:DST:dst arguments]
[RRA:CF:cf arguments]
RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)
哈哈,錯誤消失,故障解決啦!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7607759/viewspace-686368/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- NBU available_media 命令執行錯誤AI
- kafka 錯誤: larger than available brokersKafkaAI
- Package ssh is not available, but is referred to by another package 錯誤PackageAI
- Php cli模式下執行報錯/usr/bin/php: /usr/local/lib/libxml2.so.2: no version information available (required by /usr/bin/php)PHP模式XMLORMAIUI
- Vue packages version conflicts 錯誤修復VuePackage
- 錯誤:Dx unsupported class file version 52.0(解決)
- Required Java version 1.4.1. Available:1.3.1_01UIJavaAI
- spring中No bean named xxx available錯誤SpringBeanAI
- 【ERROR】su user報'This account is currently not available'錯誤 for linuxErrorAILinux
- Unsupported major.minor version 51.0 錯誤解決方案
- “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured 這個錯誤解決方案SwiftUI
- ftp錯誤命令速查(轉)FTP
- 使用 sudo 命令出現錯誤
- [mac pip錯誤]Can't connect to HTTPS URL because the SSL module is not availableMacHTTPAI
- .lastUpdated:The POM for mysql:mysql-connector-java:jar:8.1.0 is missing, no dependency information availableASTMySqlJavaJARORMAI
- 使用@Service註解出現No bean named 'xxxx' available]錯誤BeanAI
- macOS 10 13 Cocoapods 命令錯誤Mac
- Hadoop VERSION檔案誤刪Hadoop
- iOS-常見錯誤:SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0...iOSSwift
- Flask擴充套件包安裝出現錯誤:Could not find a version that satisfies the requirement ...Flask套件UIREM
- Android Studio錯誤處理Plugin is too old, please update to a more recent versionAndroidPlugin
- mysql執行命令報segmentation fault 錯誤MySqlSegmentation
- R語言中package ‘xxxx’ is not available (for R version 3.2.5)解決R語言PackageAI
- linux下java -version未找到命令LinuxJava
- Spring:錯誤No bean named 'xxxxxxx' availableSpringBeanAI
- JNI命令列下編譯錯誤解決方案命令列編譯
- oracle rman backup命令檢查資料庫錯誤Oracle資料庫
- RMAN中檢查指令碼語法錯誤的命令指令碼
- No Bean named 'Xxx' available 異常報錯BeanAI
- [vue]執行vue --version報錯:-4054 ENOSYSVue
- IIS 7.5 解析錯誤 命令執行漏洞解決方案
- docker中使用systemctl命令時報Too many open files錯誤Docker
- Abp框架之執行Update-Database 命令系列錯誤框架Database
- Linux檢查硬體錯誤工具—mcelog命令Linux
- CentOS 中yum命令執行錯誤解決辦法CentOS
- goldengate命令輸入錯誤導致的血案2Go
- 轉:rrdtool強大的繪圖的引擎繪圖
- Linux yum安裝httpd報錯 No package httpd available ?LinuxhttpdPackageAI