今天一同事发过来一个报错信息,提示如下:
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 './'.