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

Configuring Qt 5.9.5 on Ubuntu 16.04



  • I recently started working with Qt. I was trying some simple widgets. It was working as intended with no errors and suddenly Qt doesn't work anymore. I did not change any configuration/settings. I restarted my computer and I started to get the following error. I have no idea how to fix them.

    Error (when trying to open an already existing project):

    /Qt/5.9.5/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
    Project ERROR: Library '' is not defined.
    Warnings while parsing QML type information of Qt/5.9.5/gcc_64/qml:
    /Qt/5.9.5/gcc_64/qml/builtins.qmltypes:1:24: Reading only version 1.1 parts.
    /Qt/5.9.5/gcc_64/qml/builtins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
    /Qt/5.9.5/gcc_64/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
    Project ERROR: Library '' is not defined.
    /Qt/5.9.5/gcc_64/mkspecs/features/toolchain.prf(69): system(execute) requires one or two arguments.
    Project ERROR: Cannot run compiler 'g++'. Output:

    ===================```

    Error (when trying to create a new project)
    Maybe you forgot to setup the environment?
    Error while parsing file /workspace/testQt/testQt.pro. Giving up.
    /Qt/5.9.5/gcc_64/mkspecs/features/toolchain.prf(69): system(execute) requires one or two arguments.
    Project ERROR: Cannot run compiler 'g++'. Output:

    ===================

    Other details:

    Qt version: Qt 5.9.5(gcc_64)
    Compilier: GCC 7.3.0
    OS: Ubuntu 16.04.4 LTS

    PS: I had this same error two days back. Reinstalling Qt fixed it but not anymore.

    There is no problem with g++. I complied a code with the same complier (used here) through terminal and it works perfectly.
    And I did also check the Build&Run options in the creator. I dont see anything unusual in it. It was running perfectly fine with the same options. I didn't change anything in it. The kit uses the complier and qt version mentioned above. There is one warning under Qt version for Qt 5.5.1 (autodetected) which says "No QMLscene installed". However I am using Qt 5.9.5 (which has no warnings) in kit options. So I assume this is not the issue.

    Thank you.


  • Moderators

    Have you installed Qt as root user? I'd rather recommend using standard user, and install it locally.


Log in to reply