I posted a question about this during the pre-release phase. It took a while, but I got it figured out. I am posting the results here in case anyone else stumbles upon this -- and probably will, given the nature of the problem.
The symptom:
Ugrade from 17.10 -> 18.04 crashes while trying to install qdbus-qt5.
Trying to manually install the package produces this error:
----------
----------
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:
qtcreator
qtcreator-data
qtcreator-doc
qmlscene
qt5-qmake
qttools5-dev-tools
qtbase5-dev-tools
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:
I also noticed there is some sort of problem with locales; fix for that:
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".
The symptom:
Ugrade from 17.10 -> 18.04 crashes while trying to install qdbus-qt5.
Trying to manually install the package produces this error:
----------
Code:
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: /var/cache/apt/archives/qdbus-qt5_5.9.5-0ubuntu1_amd64.deb
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:
qtcreator
qtcreator-data
qtcreator-doc
qmlscene
qt5-qmake
qttools5-dev-tools
qtbase5-dev-tools
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:
Code:
## Remove the symlink: (This is rm, not rm -r, we are removing a link) 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/
Code:
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
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".