我在安装程序 rthlibs 时遇到了问题。我通过以下命令将 Qt5.1.0 的库与标准库链接起来:代码:
sudo sh -c "echo /usr/local/Qt5.1.0/5.1.0/gcc_64/lib > /etc/ld.so.conf.d/qt5.conf"
然后代码:
sudo ldconfig -v
这表明库已经链接。但是 rthlibs 程序(我想要安装的程序)抱怨:
代码:
rthlibs depends on libdcmtk2 (>= 3.6.0); however:
Package libdcmtk2 is not installed.
rthlibs depends on liblog4cxx10 (>= 0.10.0); however:
Package liblog4cxx10 is not installed.
rthlibs depends on libqt5widgets5 (>= 5.0.1); however:
Package libqt5widgets5 is not installed.
rthlibs depends on libqt5core5 (>= 5.0.1); however:
Package libqt5core5 is not installed.
rthlibs depends on libqt5core5 (>= 5.0.1); however:
Package libqt5core5 is not installed.
rthlibs depends on libqt5opengl5 (>= 5.0.1); however:
Package libqt5opengl5 is not installed.
rthlibs depends on libatlas3gf-base (>= 3.8.4); however:
Package libatlas3gf-base is not installed.
rthlibs depends on libqhull5 (>= 2009.1-2); however:
Package libqhull5 is not installed.
rthlibs depends on libqt5script5 (>= 5.0.1); however:
Package libqt5script5 is not installed.
rthlibs depends on libqt5sql5 (>= 5.0.1); however:
Package libqt5sql5 is not installed.
rthlibs depends on
dpkg: error processing rthlibs (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sbwavegen:
sbwavegen depends on libgnustep-base1.24 (>= 1.24.0); however:
Package libgnustep-base1.24 is not installed.
sbwavegen depends on libgnustep-gui0.22 (>= 0.22.0); however:
Package libgnustep-gui0.22 is not installed.
我再次使用 sudo ldconfig -v 搜索库,并注意到某些库(已链接并显示)与“rthlibs”抱怨的库有些相似。例如:libQt5Widgets.so.5
libQt5Core.so.5
libQt5OpenGL.so.5 ....
他们已经在图书馆了,但程序却抱怨。为什么?
答案1
我觉得你搞混了库和包
当你通过 apt 包管理系统安装像 rthlibs 这样的包时,据我所知,它不会直接查看单个库你已经安装在系统上 - 相反,它会查看有哪些先决条件包您已经安装过。因此,例如,如果您通过从源代码构建 Qt5 库来安装它们,则 apt-get 将不知道这些依赖项已得到满足,并且仍将要安装 rthlib 包的“依赖项”部分中列出的包。如果这些包包含与系统中已有的库版本相冲突的库版本,则 apt-get 可能无法解决这些冲突,安装将失败。
此外,“链接”对于库来说具有特定含义 - ldconfig 实际上并不链接任何东西,它只是告诉动态加载器在哪里寻找指定的库。