qdbus and qdbusviewer crash with "No such file or directory"

Bug #1251178 reported by Mechanical snail
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
Confirmed
Undecided
Unassigned
qtchooser (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Release: Ubuntu 13.10 (32-bit)

Package versions:
qtdbus 4:4.8.4+dfsg-0ubuntu18
qtchooser 26-3ubuntu2

Expected behavior:

The `qdbus` program runs, as does the related program `qdbusviewer`.

Actual behavior:

If I run the `qdbus` program, it always crashes:

user@host:~$ qdbus --help
qdbus: could not exec '/usr/lib/i386-linux-gnu/qt5/bin/qdbus': No such file or directory

The `qdbus` executable is actually:

user@host:~$ ls --full-time $(which qdbus)
lrwxrwxrwx 1 root root 9 2013-08-07 14:48:40.000000000 +0000 /usr/bin/qdbus -> qtchooser

Note that `/usr/lib/i386-linux-gnu/qt4/bin/qdbus` exists and seems to work if I invoke it directly.

There's a `qdbus-qt5` package in the universe repository. It was not pulled in as a dependency, but manually installing it fixes the issue. Therefore it's either a packaging error or a bug in qtchooser.

A similar thing happens if I run `qdbusviewer`:

user@host:~$ qdbusviewer
qdbusviewer: could not exec '/usr/lib/i386-linux-gnu/qt5/bin/qdbusviewer': No such file or directory

except that installing `qdbus-qt5` doesn't fix the issue.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: qdbus 4:4.8.4+dfsg-0ubuntu18
ProcVersionSignature: Ubuntu 3.11.0-13.20-generic 3.11.6
Uname: Linux 3.11.0-13-generic i686
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: i386
Date: Thu Nov 14 09:34:24 2013
MarkForUpload: True
SourcePackage: qt4-x11
UpgradeStatus: Upgraded to saucy on 2013-10-23 (22 days ago)

Revision history for this message
Mechanical snail (replicator-snail) wrote :
description: updated
summary: - qdbus: could not exec '/usr/lib/i386-linux-gnu/qt5/bin/qdbus': No such
- file or directory
+ qdbus and qdbusviewer crash with "No such file or directory"
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qt4-x11 (Ubuntu):
status: New → Confirmed
Changed in qtchooser (Ubuntu):
status: New → Confirmed
Revision history for this message
Murz (murznn) wrote :

I have solve this problem on Ubuntu 13.10 via command:
sudo apt-get install qt5-default qttools5-dev-tools

Revision history for this message
David Baumann (davidbaumann) wrote :

Same problem on Ubuntu 17.10, I think it's a bug.

Revision history for this message
Bruce Duncan (bwduncan) wrote :

The solution is indeed to install the qt5-default package.

Maybe this package could be added as a dependency in newer releases?

There is also perhaps an upstream bug where qtchooser could try the "other" qt version if one fails. (I had installed qdbus5, and qtchooser was trying qdbus4, which was not installed or wanted.)

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

> Maybe this package could be added as a dependency in newer releases?

We would like to make Qt 5 default, but unfortunately this will break lots of legacy Qt 4 code. So we cannot do that soon, maybe in future...

> There is also perhaps an upstream bug where qtchooser could try the "other" qt version if one fails. (I had installed qdbus5, and qtchooser was trying qdbus4, which was not installed or wanted.)

The fallback mechanism exists (in qtchooser 52-gae5eeef and newer versions), but only for some tools: <https://code.qt.io/cgit/qtsdk/qtchooser.git/tree/src/qtchooser/main.cpp#n528>. qdbus is one of them, so if you have qdbus-qt5 installed, qtchooser will use it even if you have no qt5-default package installed. If that is not the case, please let us know your qtchooser version and the console output.

Revision history for this message
Jacek Sandomierz (yatsek) wrote :

Because this is top post being shown in Google search for problems with qdbusviewer and they persist also on 18.04 here is the solution:

1. Find an error message. In my case (even after installing default):

    qdbusviewer: could not exec '/usr/lib/qt5/bin/qdbusviewer': No such file or directory

2. Find in which package is file being reported as missing:

    $ apt-file search /usr/lib/qt5/bin/qdbusviewer
    qttools5-dev-tools: /usr/lib/qt5/bin/qdbusviewer

3. Install found package:

   $ sudo apt install qttools5-dev-tools

Voila!

Revision history for this message
Georges (georgeskesseler) wrote :

It's 2021, and this issue still exists.
In my case with qdbus command, installing and re-installing qt5-default does not help.
The solution of @yatsek worked:

qdbus: could not find a Qt installation of ''

$ sudo apt-get install apt-file

$ sudo apt-file update

$ apt-file search /usr/lib/qt5/bin/qdbus
qdbus-qt5: /usr/lib/qt5/bin/qdbus
qtbase5-dev-tools: /usr/lib/qt5/bin/qdbuscpp2xml
qtbase5-dev-tools: /usr/lib/qt5/bin/qdbusxml2cpp
qttools5-dev-tools: /usr/lib/qt5/bin/qdbusviewer

$ sudo apt-get install qdbus-qt5

Voila!

Revision history for this message
pqwoerituytrueiwoq (pqwoerituytrueiwoq) wrote :

Problem still exist in kubuntu 22.04 as of 21/11/25

qttools5-dev-tools is the package that provides the applications

apt tells the user this

user@kde-test-system:~$ qdbusviewe
Command 'qdbusviewe' not found, did you mean:
  command 'qdbusviewer' from deb qtchooser (66-2build1)
Try: sudo apt install <deb name>

qtchooser is installed ad you get the error

user@kde-test-system:~$ qdbusviewer
qdbusviewer: could not exec '/usr/lib/qt5/bin/qdbusviewer': No such file or directory

this should at lease give a error saying that you need the qttools5-dev-tools package

Revision history for this message
Jacek Sandomierz (yatsek) wrote :

And here we go again... - also with qdbusviewer, and also on 18.04

Previous workaround stopped working.

After some digging it looks that qtchooser is looking into wrong Qt dir (qt4 instead of qt5)

Some other people reported that

    apt install qt5-default

may help - but I did not check this

What worked was editing

/usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf

and adding first line so it looks like this:

==== /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf ====
/usr/lib/qt5/bin
/usr/lib/x86_64-linux-gnu/qt4/bin
/usr/lib/x86_64-linux-gnu
==== EOF ====

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.