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 須要centos

而後我安裝了 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%]ide

以後再執行命令就不報錯了,
[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 --ui

今天安裝的時候出現了不同的問題。
[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.net

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

具體分析待後續相似狀況跟進..get

相關文章
相關標籤/搜索