如何安装共享库

如何安装共享库

我对 Cisco PacketTracer 有疑问

https://www.netacad.com/courses/packet-tracer

wolf@linux:/opt/pt/bin$ ./PacketTracer7
./PacketTracer7: error while loading shared libraries: libQt5WebEngineWidgets.so.5: cannot open shared object file: No such file or directory
wolf@linux:/opt/pt/bin$

事实证明,有些库不存在:

wolf@linux:/opt/pt/bin$ ldd PacketTracer7 | grep not
    libQt5WebEngineWidgets.so.5 => not found
    libQt5WebEngineCore.so.5 => not found
    libQt5Script.so.5 => not found
    libQt5ScriptTools.so.5 => not found
wolf@linux:/opt/pt/bin$

我尝试安装它,但是没有效果:

wolf@linux:/opt/pt/bin$ sudo apt install libQt5WebEngineWidgets.so.5 libQt5WebEngineCore.so.5 libQt5Script.so.5 libQt5ScriptTools.so.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libQt5WebEngineWidgets.so.5
E: Unable to locate package libQt5WebEngineCore.so.5
E: Unable to locate package libQt5Script.so.5
E: Unable to locate package libQt5ScriptTools.so.5
wolf@linux:/opt/pt/bin$

我也尝试将其改为小写并.so.5从名称中删除,但仍然不起作用。

sudo apt install libQt5WebEngineWidgets.so libQt5WebEngineCore.so libQt5Script.so libQt5ScriptTools.so

sudo apt install libQt5WebEngineWidgets libQt5WebEngineCore libQt5Script libQt5ScriptTools

sudo apt install libqt5webenginewidgets libqt5webenginecore libqt5script libqt5scripttools

正确的做法是什么?

更新

这将安装前两个库,即 libQt5WebEngineWidgets.so.5 和 libQt5WebEngineCore.so.5,但不会安装最后两个库:

sudo apt install libqt5webenginewidgets5 libqt5webenginecore5

另外两个需要安装的库:

wolf@linux:/opt/pt/bin$ ldd ./PacketTracer7 | g not
    libQt5Script.so.5 => not found
    libQt5ScriptTools.so.5 => not found
wolf@linux:/opt/pt/bin$

答案1

库的名称必须正确;它还区分大小写。试试这个:

sudo apt install libqt5webenginewidgets5 libqt5webenginecore5 libqt5script5 libqt5scripttools5

另外,请使用提供的 shell 脚本。不要直接运行 ELF 文件。那样不行。

/opt/pt/packettracer

答案2

尝试这个:

sudo apt install libqt5webenginecore5 libqt5webenginewidgets5 libqt5script5 libqt5scripttools5

它将带动更多包裹一起走。

我曾经apt-cache找到过这些,例如,这是前两个

~$ apt-cache search libQt5Script
libqt5script5 - Qt 5 script module
libqt5scripttools5 - Qt 5 script tools module

...以及后两个

~$ apt-cache search libQt5Script
libqt5script5 - Qt 5 script module
libqt5scripttools5 - Qt 5 script tools module

您还可以组合两个搜索词

apt-cache search 'libQt5WebEngine|libQt5Script'

最后,有一个可搜索的软件包数据库https://packages.ubuntu.com/

相关内容