2

When creating a .deb package I create a file named control that contains some fields:

Package: my-qt-app-name
Version: 0.01
Architecture: all
Maintainer: my name <my email address>
Installed-Size: 2
Depends: ??????
Section: extras
Priority: optional
Homepage: my homepage
Description: some description

You see the field named Depends. To be sure that my application will work on another computer that runs Ubuntu (or one of its distributions) what value must has this field?

My Qt version is 5.1.1.

The first lines from main.cpp contain:

#include "mainwindow.h"
#include <QWebView>
#include <QtWidgets>
#include <QWebFrame>
#include <QDir>
#include <QApplication>
#include <QDebug>
#include <QWebPage>
#include <QObject>
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
  • 1
    What version of Qt are you using? – Nicholas Smith Nov 04 '13 at 18:26
  • @NicholasSmith My Qt version is `5.1.1`. – Ionică Bizău Nov 04 '13 at 18:27
  • depends on which features of qt you are using.. There are a lot of – hek2mgl Nov 04 '13 at 18:27
  • @hek2mgl Do you mean what libraries do I use? I added the first lines from my cpp file. – Ionică Bizău Nov 04 '13 at 18:28
  • yeah. check `virtualbox-qt` for example. It depends on the qt packages `libqt4-network (>= 4:4.5.3), libqt4-opengl (>= 4:4.7.2), libqtcore4 (>= 4:4.8.0), libqtgui4 (>= 4:4.8.0)` (on my ubuntu 12.04) – hek2mgl Nov 04 '13 at 18:29
  • @hek2mgl I tried that. The package was installed successfully but when I run my application I get this error: "app-name: error while loading shared libraries: libQt5WebKitWidgets.so.5: cannot open shared object file: No such file or directory" (like before)... Is possible to fix this error by providing the correct dependencies in `Depends` field from `control` file? – Ionică Bizău Nov 04 '13 at 18:48
  • Try `libqtwebkit5` or `libqt5-webkit`... Btw, why don't you know that? you should know that from compile time experience... – hek2mgl Nov 04 '13 at 18:58
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/40524/discussion-between-john--and-hek2mgl) – Ionică Bizău Nov 04 '13 at 19:07

4 Answers4

4

I fixed the problem adding the following libraries to the debian control file:

Depends: libqt5webkit5-dev, qtquick1-5-dev, qtlocation5-dev, qtsensors5-dev, qtdeclarative5-dev, libsqlite3-dev

Finally my problem is fixed.

ulidtko
  • 14,740
  • 10
  • 56
  • 88
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
2

With debhelper string Depends: will be look like this

Depends: ${shlibs:Depends}, ${misc:Depends}

From Introduction to Debian Packaging

"Depends:"

field lists the packages that must be installed for the program in the binary package to work. Listing such dependencies manually is tedious, error-prone work. To make this work, the ${shlibs:Depends} magic bit needs to be in there. The other magic stuff is there for debhelper. The {misc:Depends} bit. The shlibs magic is for shared library dependencies, the misc magic is for some stuff debhelper does. For other dependencies, you need to add them manually to Depends or Build-Depends and the ${...} magic bits only work in Depends

dismine
  • 575
  • 13
  • 17
1

If you use the Debhelper packaging tools, the build process can automatically detect any dependencies of your package incurred by dynamic library linking, using wrappers around the dpkg-shlibdeps tool, and fill them in to your debian/control file for you.

the paul
  • 8,972
  • 1
  • 36
  • 53
  • Can you explain more how can I do that...? – Ionică Bizău Nov 05 '13 at 19:39
  • To give a very good answer would take far more space than these comments allow, but see the tutorial at https://wiki.debian.org/IntroDebianPackaging for a good overview and introduction. – the paul Nov 06 '13 at 17:05
0

You need the package libqt5webkit5 as a dependency

hek2mgl
  • 152,036
  • 28
  • 249
  • 266