Nominate our 2022 Qt Champions!

Installing Qtcreator on xubuntu

  • I am a naive user of the Qt. I have installed Qt5. 5 on the xubuntu. But when I try to compile a basic program on the Qtcreator, it shows the error "compiler not set in the kit options".
    I have tried to set but its not working.
    Please help in this regard.
    And moreover whether the Qt developer should not have provided all the settings? , The naive user like me face a lot difficulty.

  • Moderators

    Do you have gcc or clang installed? If not, run this in terminal:

    sudo apt install build-essential

    And then try again in Qt Creator.

    I have tried to set but its not working.

    Can you provide any more detail? What have you done, how did it fail?

  • @sierdzio i have installed Qt5. 5 but when I try to build a basic program, it says compiler not set at the kit option.
    Then I have read something about how to set compiler and followed that.
    Now it says
    Make:no such file or directory
    fatal error: no input file

    Please provide the details of the proper settings.

    And moreover, why such settings is not happening automatically at the time of installation.

  • @sierdzio for the command
    Sudo apt install build - essential
    It says no such depository

    I have used qt-unified-x86-linux offline installer

  • Lifetime Qt Champion

    @Dinesh123 It is

    apt install build-essential

    without spaces between build - essential. And it is there in Xubuntu (18.04 which I'm using).

  • Moderators

    Qt 5.5? That's very old. Are you forced to use an ancient version of Qt? If not, get the online installer and install either Qt 5.12 or 5.14.

    Make:no such file or directory

    I think you are still missing basic compilation tools. Run sudo apt install build-essential (there are no spaces between words in build-essential!). It has to work, even on xubuntu.

    fatal error: no input file

    Or you are trying to compile a project without files?

    And moreover, why such settings is not happening automatically at the time of installation.

    Because in C++ world, the choice of compiler is up to you. Qt can work with clang or g++, and with a wide variety of compilator versions. It's your responsibility to set your dev environment, not Qt's.

  • @sierdzio The command
    Sudo apt-get install build-essential does not work.

    The error is build-essential has no candidate.

    I have used
    And performed the settings as mentioned in the following link

    And now it says

    error :g++ command not found

    While trying to build a basic application (gcc compiler set in the kit option ).
    I am unable to understand what is going wrong.
    Help to resolve this issue or provide proper Web link specifying the details of qtcreator settings.

  • Lifetime Qt Champion


    Your issue currently is that your system is not properly setup and it's not a Qt Creator problem. All derivatives of Debian have the build-essential package which is meta package providing a set of tools for compilation and the rest.

    If you have, first ensure that your package cache is up to date and use it to search that package. Please learn the tools to manage your Linux installation.

  • Lifetime Qt Champion

    what version of Xubuntu are you using?

    if you cant do

    sudo apt-get update
    sudo apt-get install build-essential

    Then something up with your installation.

    Normally you do not need to setup Creator it find gcc by itself!

    so i dont think you have gcc and tool chain installed as that comes from
    So before even looking at Creator. You have to have a working gcc toolchain.

  • Moderators

    Are you building for Yocto (embedded Linux) targets? If no, then don't use instructions on how to set up for Yocto development. It won't help you get local dev env for Qt development.

Log in to reply