我正在为 ubuntu 14.04 64 位的 QT 5.2.1 桌面应用程序制作 .deb 包。我在 Ubuntu 14.04 上安装了 QT 5.2.1,并制作了一个演示应用程序用于测试,其中我使用了 quazip 库。在制作应用程序的 .deb 包时,我遇到了以下问题。
dpkg-shlibdeps: error: couldn’t find library libquazip.so.1 needed by debian/demoapp/usr/bin/DemoApp1 (ELF format: ‘elf64-x86-64’; RPATH: ‘’)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/demoapp/usr/bin/DemoApp1 was not linked against libz.so.1 (it uses none of the library’s symbols)
dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to use -l.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
make: *** [binary-predeb-IMPL/demoapp] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
当我在我的计算机中复制libquazip.so.1
路径时/usr/lib
,出现了以下问题。
dpkg-shlibdeps: error: no dependency information found for /usr/lib/libquazip.so.1 (used by debian/demoapp/usr/bin/DemoApp1)
dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
make: *** [binary-predeb-IMPL/demoapp] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
我的 CMakeLists.txt 文件如下。
cmake_minimum_required(版本 2.8.9) 项目(DemoApp1) 设置(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} “;/opt/Qt5.2.1/5.2.1/gcc_64/lib/cmake;”) find_package(Qt5Widgets 需要) 包括目录(/home/manojpatidar/Manoj/Work/QT_WORK/Linux_Package/demoapp-1.0/lib/quazip-0.5.1/quazip) 链接目录(/home/manojpatidar/Manoj/Work/QT_WORK/Linux_Package/demoapp-1.0/lib/quazip-0.5.1) 添加可执行文件(DemoApp1 main.cpp mainwindow.cpp moc_mainwindow.cpp mainwindow.ui) 目标链接库(DemoApp1 quazip z) 安装(目标 DemoApp1 运行时目标 bin) qt5_use_modules(DemoApp1 小部件)
我的 Debian 控制文件如下。
来源:demoapp 版块:游戏 优先级:额外 维护者:Manoj Patidar 构建依赖:debhelper(>= 8.0.0)、cmake、qtbase5-dev、cdbs 标准版本:3.9.4 软件包:demoapp 建筑类型:任意 依赖:${shlibs:Depends}、${misc:Depends} 描述:描述 描述将出现在这里
我想我需要quazip
在行中添加一些依赖项Depends: ${shlibs:Depends}, ${misc:Depends}
。我是否遗漏了什么?