Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Installing Qt 6.0 on Ubuntu 20.04.1 LTS (QtCreator crashed)



  • I've just installed Qt 6.0 using the installer qt-unified-linux-x64-4.0.1-online.run
    on a fresh Ubuntu 20.04.1

    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.1 LTS
    Release: 20.04
    Codename: focal

    But, Qtcreator was crashing.

    bob@bob-desktop:/opt/Qt/Tools/QtCreator/bin$ export QT_DEBUG_PLUGINS=1
    bob@bob-desktop:/opt/Qt/Tools/QtCreator/bin$ ./qtcreator
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqeglfs.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqeglfs.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "eglfs"
    ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("eglfs")
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqlinuxfb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "linuxfb"
    ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimal.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimal.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimal"
    ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimalegl.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqminimalegl.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "minimalegl"
    ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("minimalegl")
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqoffscreen.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "offscreen"
    ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqvnc.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqvnc.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "vnc"
    ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("vnc")
    QFactoryLoader::QFactoryLoader() looking at "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so"
    Found metadata in lib /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so, metadata=
    {
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
    "Keys": [
    "xcb"
    ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
    }

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/opt/Qt/Tools/QtCreator/bin/platforms" ...
    Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
    QLibraryPrivate::loadPlugin failed on "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

    Aborted (core dumped)

    I've been able to fix the crash after some seach by installing those:

    sudo apt-get install libx11-xcb-dev
    sudo apt-get install libxcb-xinerama0

    Not, sure if both are needed or just the second one, but now it's working.
    Just wanted to share my experience with others, in case someone else face the same issue.



  • @Castillo
    Just for the record, it was always required to install those 2 libraries under Qt5 --- as can be seen by searching this forum for same problem --- so nothing particularly Qt6 here.



  • @JonB
    Probably True, but i never had to use Qt installer to install Qt before...
    Either Qt5 is already installed on some distro, or atlease the distro is dealing with the dependencies.
    So, i never had this issue with Qt 5.
    Even though some people had this issue in the past shouldn't there a README or somethings?
    Is it normal to install something with the official installer, and when running it. It crashes?


  • Lifetime Qt Champion

    @Castillo said in Installing Qt 6.0 on Ubuntu 20.04.1 LTS (QtCreator crashed):

    or atlease the distro is dealing with the dependencies

    Yes, they do.

    "Even though some people had this issue in the past shouldn't there a README or somethings?" - there is: https://doc.qt.io/qt-5/linux.html

    "Is it normal to install something with the official installer, and when running it. It crashes?" - no, but there can be many reasons why something is crashing.



  • @jsulm

    You gave me the link for Qt5, but there is the link for Qt6.

    https://doc.qt.io/qt-6/linux.html

    Quote:
    *The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. In addition, building graphical Qt applications requires OpenGL libraries and headers installed. Most Linux distributions do not install all of these by default, but setting up a development environment is still straightforward.

    Use the following commands to install the basic requirements for building Qt applications:*

    *Debian/Ubuntu (apt-get)

    sudo apt-get install build-essential libgl1-mesa-dev*

    I tested:
    (by default they were not installed, so i removed them)
    sudo apt purge libxcb-xinerama0
    sudo apt purge libx11-xcb-dev

    (what the qt 6.0 link says to install)
    sudo apt-get install build-essential libgl1-mesa-dev

    It says: both are already the newest.

    Run Qt Creator, and it crashes.

    I understand that Qt is a library, and there should be no issue installing it, but it also include a full software QtCreator with dependencies. SO, i thought that maybe it could be installed without having to search the web to make it run ?

    Well, my post wasn't about complaining. It was to provide informations to people like me trying to install it on Ubuntu.


  • Lifetime Qt Champion

    @Castillo QtCreator can crash for various reasons (on my Ubuntu 20.04 it runs fine). Usually some plug-ins are the issue. You can try to start it with "-noload all" (see https://doc.qt.io/qtcreator/creator-cli.html) parameter to see whether that makes a difference. If it helps you can find out which plugin is the one crashing using "-noload all -load PLUG_IN_NAME". Most of the time it's the Welcome plug-in.



  • @jsulm
    Short story. I've installed Ubuntu 20.04 on a new hard drive using a usb key.
    I wanted to be sure not to mix Qt5 and Qt6 projects. After that i've installed
    Qt6 with the offical installer, but like i said QtCreator was crashing.
    (see entry 1 of this post)

    There is no issue now, because i've found how to fix the problem. I just thought that i'll share my experience.

    But, the discussion went more into it's nothing new, you should had read this or that.

    I'm not going to re-install Ubuntu 20.04 to find what went wrong.
    I just have the feeling in my case some informations was missing, or something went wrong. I don't mind. It's ok.


  • Lifetime Qt Champion

    Hi @Castillo,

    There is QTBUG-84749, and I think that is related to your problem. In former times, more libraries were shipped together with Qt, so Creator did run on systems with fewer dependencies.

    For now, we will have to install additional libraries, it seems.

    Regards



  • @aha_1980 I had the opposite experience - after "installer" is finished the next step is to "launch".

    Nothing launches ....because installer DID NOT installed functioning IDE.

    Let me put it this way
    #1 If I download "installer" for Qt software for Linux , as advertised, I expect it to execute without having to change the file to executable - in Linux.

    #2 I want to install IDE , I do not want just standalone "library" .

    #3 As of now this is not an installer . The "installer" need to load ALL necessary components (GCC, OpenGL etc.) one needs to "launch" Qt IDE . As it is it should be advertised as "Qt librarian" .

    BTW - ships are launched, as far I am concerned software EXECUTES or RUNS.

    Actually - I am wrong with my observation - how does one launches a library ?


  • Lifetime Qt Champion

    @AnneRanch
    #1 - this is normal on Linux and has to do with security (you usually really don't want downloaded files to be executable out of the box). A software developer should know how to make a file executable.
    #2 - QtCreator is installed by default when using the online installer provided by Qt Company
    #3 - It is an installer downloading most data from the Internet (including QtCreator). If you want an installer which includes everything then use offline installer (but keep in mind - it is big).


Log in to reply