https://pgmodeler.io/support/installation说:
解决依赖关系
成功编译源代码并安装二进制文件后,我们需要将一些依赖项复制到 pgModeler的安装文件夹以及运行一些命令以 让二进制文件正确找到它们。
GNU / Linux
1: cd $QT_ROOT/lib 2: cp libQt5DBus.so.5 libQt5PrintSupport.so.5 libQt5Widgets.so.5 libQt5Network.so.5 libQt5Gui.so.5 libQt5Core.so.5 libQt5XcbQpa.so.5 libQt5Svg.so.5 libicui18n.so.5* libicuuc.so.5* libicudata.so.5* $PGMODELER_ROOT/lib 3: cd $QT_ROOT/plugins 4: mkdir $PGMODELER_ROOT/lib/qtplugins 5: mkdir $PGMODELER_ROOT/lib/qtplugins/imageformats 6: mkdir $PGMODELER_ROOT/lib/qtplugins/printsupport 6: mkdir $PGMODELER_ROOT/lib/qtplugins/platforms 7: cp -r imageformats/libqgif.so imageformats/libqico.so imageformats/libqjpeg.so imageformats/libqsvg.so imageformats/libqtga.so imageformats/libqtiff.so imageformats/libqwbmp.so $PGMODELER_ROOT/lib/qtplugins/imageformats 8: cp -r printsupport/libcupsprintersupport.so $PGMODELER_ROOT/lib/qtplugins/printsupport 9: cp -r platforms/libqxcb.so $PGMODELER_ROOT/lib/qtplugins/platforms 10: echo -e "[Paths]\nPrefix=.\nPlugins=lib/qtplugins\nLibraries=lib" > $PGMODELER_ROOT/qt.conf 11: cp $PGMODELER_SOURCE/start-pgmodeler.sh $PGMODELER_SOURCE/pgmodeler.vars $PGMODELER_ROOT 12: chmod +x $PGMODELER_ROOT/start-pgmodeler.sh
在make
和make install
之后,程序运行时是否可以动态解析(动态链接)依赖关系?进行上述操作的目的是什么?
如果我改为运行sudo checkinstall
创建一个deb文件,我是否仍需要解决上述依赖关系?
谢谢!
答案 0 :(得分:1)
似乎要创建一个安装程序包,以(可能)在另一台计算机上进行部署/安装。
回想一下,当我编写Qt代码(即打包所有相关的库/插件)时(在我自己的makefile中)具有这种自动化功能。当Qt程序运行时,它通常位于具有正确结构lib/...
和lib/plugins/...
的同一目录中,这样当您使用lib子文件夹运行已编译的可执行文件(例如在另一台计算机上)时,它便知道在哪里库是。如果您仍需要执行将LD_LIBRARY_PATH设置为./lib的操作,我现在就不记得了-我想我记得我在链接器命令中添加了一个lib路径。
您可以从一个古老的相关问题中看到我的答案:how-to-deploy-qt-application-在这个答案中,我尝试使用ldd之类的工具来自动化您在上面看到的该过程。