I am unable to upgrade 17.10 to 18.04 because the installation of qdbus-qt5 is failing. This is actually kubuntu, but I have asked the question on the kubuntu and ubuntu forums, as well as launchpad, and have not been able to resolve the problem. The upgrade goes fine until it reaches qdbus-qt5, at which point it crashes and cannot go any further. I tried purging qbdus-qt5 (and most of kde along with it), and the upgrade goes through, but still cannot install qbdus-qt5 and therefore kde.

Trying to manually install qdbus-qt5 with dpkg, I get the following error:

root@Crynfyd:/# dpkg -i /var/cache/apt/archives/qdbus-qt5_5.9.5-0ubuntu1_amd64.deb
(Reading database ... 839516 files and directories currently installed.)
Preparing to unpack .../qdbus-qt5_5.9.5-0ubuntu1_amd64.deb ...
Unpacking qdbus-qt5 (5.9.5-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/qdbus-qt5_5.9.5-0ubuntu1_amd64.deb (--install):
unable to open '/usr/lib/qt5/bin/qdbus.dpkg-new': No such file or directory
Errors were encountered while processing:

Basically it is supposed to be creating the file /usr/lib/qt5/bin/qdbus.dpkg-new , but it is deleting it instead. If I touch the file, it deletes it and quits. Some sort of strange conundrum that I can't get around.

More details in launchpad here:


Any help or ideas much appreciated. Please, no "fresh install", that is impractical and not a solution. I don't really know where the problem is, whether a problem with qdbus-qt5, dpkg, or whatever else I cannot imagine as others don't seem to be having this problem, and it isn't occurring with other packages (well, it does occur with other qtcreator packages, but I have purged those before the upgrade). This is a real mess and it is blocking the whole upgrade process.


Problem Solved.

The symptom:

Ugrade from 17.10 -> 18.04 crashes while trying to install qdbus-qt5. Trying to manually install the package produces this error:

root@Crynfyd:/# dpkg -i /var/cache/apt/archives/qdbus-   qt5_5.9.5-0ubuntu1_amd64.deb
(Reading database ... 839516 files and directories currently installed.)
Preparing to unpack .../qdbus-qt5_5.9.5-0ubuntu1_amd64.deb ...
Unpacking qdbus-qt5 (5.9.5-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/qdbus-qt5_5.9.5-0ubuntu1_amd64.deb (--install):
unable to open '/usr/lib/qt5/bin/qdbus.dpkg-new': No such file or directory
Errors were encountered while processing:

Here is the problem:

In artful, the package qdbus-qt5 installs its binary to /usr/lib/x86_64-linux-gnu/qt5/bin/qdbus . The directory /usr/lib/qt5 is actually a symbolic link to /usr/lib/x86_64-linux-gnu/qt5 . So ls /usr/lib/qt5/bin/ produces a list of files that looks real, but they aren't really there. I noticed that doing a dpkg-query --search /usr/lib/qt5/bin/qdbus produced no results, and wondered why, as the files looked like they were there.

In bionic, the package qdbus-qt5 installs its binary to /usr/lib/qt5/bin/qdbus, and installs a symlink in /usr/lib/x86_64-linux-gnu/qt5/bin/qdbus that points to /usr/lib/qt5/bin/qdbus .

So when trying to upgrade from artful to bionic, the package installs its binary into a directory that is a symlink to /usr/lib/x86_64-linux-gnu/qt5/bin/ and then tries to install the symlink to the file the directory actually points to. I discovered this while trying to manually install the files from the package, and files were just disappearing. This is what dpkg has been screaming about all along.

There is a problem, therefore, in the upgrade process going from which files are symlinks and which are actual binaries. The upgrade process evidently doesn't address this problem. I read somewhere that the upgrade from 16.04 -> 18.04 won't be in place until July; this may be one of the reasons why, and maybe the same problem going from 17.10 -> 18.04. There may be other problems that have not surfaced as of yet.

Note that this same problem also exists for several other packages, mostly connected with QT Creator:


And maybe others I haven't found yet. They can be removed prior to the upgrade, though in my test they did not cause any problems after applying the hack below.

SHAMELESS HACK to fix this for the upgrade:

## Remove the symlink:
sudo rm /usr/lib/qt5
## Do a hard copy of the relevant files:
sudo cp -r /usr/lib/x86_64-linux-gnu/qt5 /usr/lib/

I also noticed there is some sort of problem with locales; fix for that:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

Then upgrade/dist-upgrade (or do-release-upgrade, or however you do it). Still needed the occasional apt-get install -f / dpkg --configure -a / dpkg -i --force-overwrite , but seems to go through as expected.

So much for "fresh install".

PS: Thanks to those who offered help. The bit about dpkg -x ing the package, and the bizarre results it produced, is what tipped me on this.

  • This appears to be a problem unique to your setup. Do you know what caused your computer to be set up that way? Is this a system that has been upgraded multiple times across many versions of Ubuntu?
    – xiota
    May 13, 2018 at 16:07
  • Right, this system has been upgraded multiple times since Xenial (16.04). This is the first time there has been any problem like this. Since from the release notes they intend to provide an upgrade path from Xenial to Bionic, I suspect this is a problem that will eventually be addressed. May 14, 2018 at 17:04

2 Answers 2


Before attempting to upgrade, you should ensure that no PPAs or non-standard repositories are installed.  This can be done from a GUI, such as synaptic, but I usually look directly in /etc/apt/sources.list.d/.

After removing PPAs and non-standard repositories, update and safe-upgrade.  I prefer to use aptitude because it automatically resolves conflicts, which requires extra switches in apt/apt-get/dpkg:

sudo aptitude update
sudo aptitude safe-upgrade

Then dist-upgrade:

sudo aptitude dist-upgrade

If you have problems with dist-upgrade, there are probably conflicts caused obsolete packages, which were in 17.10, but removed from 18.04.  You can try one or more of the following:

  1. Install only manually installed packages:

    sudo aptitude install `apt-mark showmanual`

    Remove packages aptitude complains about with sudo aptitude remove [package] and reattempt.

  2. Find and install upgradable packages:

    aptitude search '~U' -F '%p'

    You can try to upgrade them all at once with:

    sudo aptitude remove `aptitude -s search '~U' -F '%p'`
  3. Find and remove obsolete packages.  To get a list of packages that are obsolete, you can use:

    aptitude search '~o' -F '%p'

    To remove them all at once, you can try the following command, but if it wants to remove more than a few dozen packages, you should skip it:

    sudo aptitude remove `aptitude -s search '~o' -F '%p'`

Then try again to install kubuntu-desktop or kubuntu-full or whatever packages you want:

sudo aptitude install kubuntu-desktop

In case you are still having problems, the deb file may be corrupt.  Choose one of the following:

  1. sudo \rm /var/cache/apt/cache/*qdbus* You can use similar commands to remove the debs of any packages that appear to be causing problems.

  2. sudo aptitude clean – This will remove all cached deb files.

  • It is great, but OP has some special problems with '/usr/lib/qt5/bin/qdbus.dpkg-new' file. Your solution is about manual TUI upgrade, not about this problem.
    – N0rbert
    May 9, 2018 at 22:47
  • OP wants kde installed. Beyond that, I doubt OP cares about particular files. dpkg tends to throw all sorts of misleading errors when there are conflicting packages. That is what should be dealt with first.
    – xiota
    May 9, 2018 at 22:59
  • Hello, thanks for your suggestions. I have to say that I do not trust aptitude -- it has destroyed my system once before I knew better, and threatened to do so more than once, so no. But the idea of removing all of the packages to be removed in a separate operation prior to doing the upgrade is one I haven't tried, and will give that a shot. FSCK done, no problems. I have manually downloaded the deb file and tried installing it, same results. I always do the upgrade with sources.list.d disabled; I have tried both ways, same result. I also did try apt-get update/upgrade/dist-upgrade, no joy. May 10, 2018 at 2:29
  • FYI - for the fun of it, I ran the aptitude search '~o' -F '%p' command; it wants to remove 866 packages, while apt-get dist-upgrade wants to remove 87, so I don't think I will hit that button. May 10, 2018 at 2:37
  • Further comments addeed as an "answer". Sorry, I don't know much about editing comments here. May 10, 2018 at 19:25

At first check your file-system with fsck during boot (Shift in GRUB, select Advanced options, select .... (recovery mode), in Recovery menu select fsck - Check all filesystems) or from Ubuntu 18.04 LiveCD/USB.

Then ensure that you do not have broken packages:

sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a

Remove downloaded deb-package as it may be corrupted:

sudo rm /var/cache/apt/archives/qdbus-qt5_5.9.5-0ubuntu1_amd64.deb

You can try to download this package again with

cd /var/cache/apt/archives/
sudo wget http://mirrors.kernel.org/ubuntu/pool/universe/q/qttools-opensource-src/qdbus-qt5_5.9.5-0ubuntu1_amd64.deb

for sure you can create the folder for qdbus.dpkg-new:

sudo mkdir -p /usr/lib/qt5/bin/

and install it forcing all problems

sudo dpkg -i --force-all qdbus-qt5_5.9.5-0ubuntu1_amd64.deb
sudo apt-get install -f

or install it with apt-get:

sudo apt-get install ./qdbus-qt5_5.9.5-0ubuntu1_amd64.deb

Other hacky way is to extract deb-package directly with

sudo dpkg -x qdbus-qt5_5.9.5-0ubuntu1_amd64.deb /

and then ask apt-get to reinstall it

sudo apt-get install --reinstall qdbus-qt5
  • Yes, I have tried those things. If I create the file, then install with dpkg -i --force-all, it comes back with the same error, and after that, the file I created is gone. May 9, 2018 at 22:23
  • I can of course extract the package and manually install the files, and that works, but apt knows nothing about it and therefore will not install the kde packages (most of kde) that depend on it. I have been the install -f, dpkg --configure -a, apt-get --fix-broken round and round, but it always quits in the same place -- with the above quoted error. May 9, 2018 at 22:36
  • See top part about fsck. Are you sure that filesystem is consistent? Are you sure that disk does not have read errors and bad-blocks? I can't find any normal reason for problems with writing qdbus.dpkg-new file.
    – N0rbert
    May 9, 2018 at 22:38
  • For fsck, easier to use sudo touch /forcefsck then reboot.
    – xiota
    May 9, 2018 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.