centos7 如何處理 libQt5Widgets.so.5 問題

今天一同事發過來一個報錯信息,提示如下:
error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory
查了幾個博客分享的解決方法,裝了一些包(例如 libGL libGL-devel)等無果,後來發現了一個 rpm 包的網站 rpm.pbone.net,然後安裝了一個線上rpm包;
開始提示說有依賴:

[root@log ~]# rpm -ivh ftp://mirror.switch.ch/pool/4/mirror/centos/7.4.1708/os/x86_64/Packages/qt5-qtbase-gui-5.6.2-1.el7.x86_64.rpm
獲取ftp://mirror.switch.ch/pool/4/mirror/centos/7.4.1708/os/x86_64/Packages/qt5-qtbase-gui-5.6.2-1.el7.x86_64.rpm
錯誤:依賴檢測失敗:
libQt5Core.so.5()(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5Core.so.5(Qt_5)(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5Core.so.5(Qt_5.6)(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5Core.so.5(Qt_5_PRIVATE_API)(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5DBus.so.5()(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5DBus.so.5(Qt_5)(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5Network.so.5()(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
libQt5Network.so.5(Qt_5)(64bit) 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要
qt5-qtbase(x86-64) = 5.6.2-1.el7 被 qt5-qtbase-gui-5.6.2-1.el7.x86_64 需要

然後我安裝了 qt5-qtbase
[root@log ~]# yum install -y qt5-qtbase
安裝完成後,再執行上條rpm安裝時,就OK了
[root@log ~]# rpm -ivh ftp://mirror.switch.ch/pool/4/mirror/centos/7.4.1708/os/x86_64/Packages/qt5-qtbase-gui-5.6.2-1.el7.x86_64.rpm
獲取ftp://mirror.switch.ch/pool/4/mirror/centos/7.4.1708/os/x86_64/Packages/qt5-qtbase-gui-5.6.2-1.el7.x86_64.rpm
準備中... ################################# [100%]
正在升級/安裝...
1:qt5-qtbase-gui-5.6.2-1.el7 ################################# [100%]

之後再執行命令就不報錯了,
[root@log ~]# /home/arith/sources/PredictConsole
PredictConsole v0.9, 2017
Usage:
PredictConsole inFileSale inFileWeather startPredictDay lenth outFile dir

  • -inFileSale: An absolute file path of history sale data.
  • -inFileWeather: An absolute file path of history Weather data.
    -startDay: The day start to predict, should early than max date in inFileData. in string type like '2017/1/1'. Default value is 0.
    -lenth: The disired lenth of predicting days, in UINT type. Default value is 7.
    -outFile: An absolute file path of destination predict result, in String type. Default value is 'result+time.csv'.
    -dir: Optional. An absolute directory path which includes the /data subdir, in String type. Default value is './'.

-- 2018-04-23 --

今天安裝的時候出現了不一樣的問題。
[root@iZwz9chwdyqnsgcy638aafZ ~]# rpm -ivh ftp://mirror.switch.ch/pool/4/mirror/centos/7.4.1708/os/x86_64/Packages/qt5-qtbase-gui-5.6.2-1.el7.x86_64.rpm
Retrieving ftp://mirror.switch.ch/pool/4/mirror/centos/7.4.1708/os/x86_64/Packages/qt5-qtbase-gui-5.6.2-1.el7.x86_64.rpm
error: Failed dependencies:
libEGL.so.1()(64bit) is needed by qt5-qtbase-gui-5.6.2-1.el7.x86_64
libxcb-icccm.so.4()(64bit) is needed by qt5-qtbase-gui-5.6.2-1.el7.x86_64
libxcb-render-util.so.0()(64bit) is needed by qt5-qtbase-gui-5.6.2-1.el7.x86_64

後來直接使用 yum install -y qt5-qtbase-gui 安裝解決的。。。

具體分析待後續類似情況跟進..

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章