Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] gcc not recognized in QT after installation
Forum Update on Monday, May 27th 2025

[SOLVED] gcc not recognized in QT after installation

Scheduled Pinned Locked Moved General and Desktop
24 Posts 4 Posters 9.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    developSomething
    wrote on 27 May 2015, 09:13 last edited by
    #3

    Hi and thanks for the welcome,
    well i do have the problem that i can not use QT without compiler.

    Where is the compiler located?
    I have no idea and tried everything possible by searching, but nothing.
    All this sudo-whatsoever-voodoo for the installation didn't give me the slightest hint where the GCC compiler is located, but it is obviously working as the console command gcc -v shows.

    But where???

    Is it hidden because i need admin rights to find it? or which magic do i have to add to be able to make it visible to QT?
    Please help.

    K 1 Reply Last reply 27 May 2015, 10:11
    0
    • D developSomething
      27 May 2015, 09:13

      Hi and thanks for the welcome,
      well i do have the problem that i can not use QT without compiler.

      Where is the compiler located?
      I have no idea and tried everything possible by searching, but nothing.
      All this sudo-whatsoever-voodoo for the installation didn't give me the slightest hint where the GCC compiler is located, but it is obviously working as the console command gcc -v shows.

      But where???

      Is it hidden because i need admin rights to find it? or which magic do i have to add to be able to make it visible to QT?
      Please help.

      K Offline
      K Offline
      koahnig
      wrote on 27 May 2015, 10:11 last edited by
      #4

      @developSomething
      I love your term "sudo-whatsoever-voodoo". :D
      Being also a windows user I am completely understanding your frustration. However, sudo-stuff seem to be also under linux the only reliable way to do things in a similar way across different versions. Especially also Ubuntu as probably also other distributions follow the stupid MS windows path in changing permanently the look and feel of their products. Some people might enter into higher emotional spheres when discovering completely changed colors, shapes and text entries. However, exactly that bbecomes a nightmare for those trying to get things done.

      The compiler must be installed in one of the typical locations (see e.g.) The naming of those folders are contracdicting the normal human sense of windows users for a couple of decades now.

      At the day''s end I found that it is not really essential to know exactly where your compiler is installed.

      Yes, you need to have root rights for installation. There should be typically an "software update center" or something similar to allow you to do installation of different apps. Unforunately I cannot boot 14.04 to check the proper name. In a previous version is was called "Ubuntu Software Center".
      After mastering the banality to find this, it is IMO straight forward to add the installation of GCC by using the search functionality.

      When your terminal does not find gcc or only an older version than you require, you need to install a new version.
      Hope that helps!

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        developSomething
        wrote on 27 May 2015, 12:20 last edited by
        #5

        @koahnig

        Hi and thanks for your answers.
        At least i have found the directory where gcc is installed on my system. it is in /usr/bin/
        Of course there are several different versions available, it seems gcc-4.8 is the best bet. So first step is: hooray! it is found!
        But only by me as the poor little human in front of the monitor.
        Not by Qt!

        Qt constantly refuses my choice for the compiler!
        It is impossible to select it!

        I have uninstalled Qt twice and reinstalled to a different location, hoping for the miracle it might discover the installed gcc automagically, but No! No matter what i try the compiler gets constantly ignored.
        so no matter which kit i choose or try to edit by selecting the installed gcc into it i ALWAYS get only the error message when setting up a project

        "Fehler: im Kit ist kein Compiler eingerichtet"
        Thanks to the QT-Installer i cannot choose another language but german, like for example english for my installation. It is not allowed for me.
        So the transaltion for the forum is:
        Error: there is no compiler set up in the kit

        whenever i set up the compiler in whichever kit it gets selected without any error or hint and then silently removed again.
        whoooosh...wiped out
        funny

        What the F*** do i have to do to make QT use the compiler?
        Instead of ignoring it?

        K 1 Reply Last reply 27 May 2015, 12:41
        0
        • D developSomething
          27 May 2015, 12:20

          @koahnig

          Hi and thanks for your answers.
          At least i have found the directory where gcc is installed on my system. it is in /usr/bin/
          Of course there are several different versions available, it seems gcc-4.8 is the best bet. So first step is: hooray! it is found!
          But only by me as the poor little human in front of the monitor.
          Not by Qt!

          Qt constantly refuses my choice for the compiler!
          It is impossible to select it!

          I have uninstalled Qt twice and reinstalled to a different location, hoping for the miracle it might discover the installed gcc automagically, but No! No matter what i try the compiler gets constantly ignored.
          so no matter which kit i choose or try to edit by selecting the installed gcc into it i ALWAYS get only the error message when setting up a project

          "Fehler: im Kit ist kein Compiler eingerichtet"
          Thanks to the QT-Installer i cannot choose another language but german, like for example english for my installation. It is not allowed for me.
          So the transaltion for the forum is:
          Error: there is no compiler set up in the kit

          whenever i set up the compiler in whichever kit it gets selected without any error or hint and then silently removed again.
          whoooosh...wiped out
          funny

          What the F*** do i have to do to make QT use the compiler?
          Instead of ignoring it?

          K Offline
          K Offline
          koahnig
          wrote on 27 May 2015, 12:41 last edited by
          #6

          @developSomething
          You might want to check if there is no more recent compiler in the repository. Actually you find on this page gcc 4.9. Since you are using Qt 5.4.1 this might be the reason for your problems since it is compiled apparently with gcc 4.9. Therefore, it rejects gcc 4.8.

          The language looks more like a Qt creator setting. In the English version you have under "Options"->"Environment" the possibility to change the language used. I hate the translations to German as well and switch as fast as possible to English. ;)

          When you repository does not include gcc 4.9 there are ways to install another version of gcc when it is only available outside of repro.
          However, from personal experience I know that you are typically starting a "life-long" battle with your system, when you start to change those things. My personal rating is that those kind of manipulations are more for linux masochists loving cryptic line commands. Nothing really for windows boys like us.

          I would recommend rather downloading and using the previous version of Qt or upgrading Ubuntu.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            developSomething
            wrote on 27 May 2015, 13:16 last edited by
            #7

            @koahnig
            It is hooray again!
            Now with gcc-4.9 my choice is both allowed and accepted.
            I have a real compiler in QT set up now!

            Next problem:
            the build stops with the following error:
            g++: command not found

            My guess is it is about the qmake build step which is as following
            qmake: qmake testwin.pro -r -spec linux-g++ CONFIG+=debug

            1 Reply Last reply
            1
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 27 May 2015, 13:37 last edited by
              #8

              Let's add some voodoo:
              sudo apt-get install build-essential

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              D 1 Reply Last reply 27 May 2015, 13:47
              1
              • S SGaist
                27 May 2015, 13:37

                Let's add some voodoo:
                sudo apt-get install build-essential

                D Offline
                D Offline
                developSomething
                wrote on 27 May 2015, 13:47 last edited by
                #9

                @SGaist
                my voodoo capabilities did not succeed
                here is the result:
                Paketlisten werden gelesen... Fertig
                Abhängigkeitsbaum wird aufgebaut.
                Statusinformationen werden eingelesen.... Fertig
                E: Paket build-essential kann nicht gefunden werden.

                translation:
                the package build-essential can not be found

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 27 May 2015, 13:52 last edited by
                  #10

                  Was ? Oo

                  That's something pretty strange then…

                  You can find it listed here

                  Do you have a special install of Ubuntu Trusty ?

                  In any case, you can also just call sudo apt-get install g++ but still it's puzzling

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  D 1 Reply Last reply 27 May 2015, 14:20
                  0
                  • S SGaist
                    27 May 2015, 13:52

                    Was ? Oo

                    That's something pretty strange then…

                    You can find it listed here

                    Do you have a special install of Ubuntu Trusty ?

                    In any case, you can also just call sudo apt-get install g++ but still it's puzzling

                    D Offline
                    D Offline
                    developSomething
                    wrote on 27 May 2015, 14:20 last edited by
                    #11

                    @SGaist
                    Now the compiler g++ is installed and working!
                    Third hooray!

                    But the first testproject build stops with the issue:
                    cannot find -lGL

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 27 May 2015, 14:35 last edited by
                      #12

                      That one has been covered many times in this forum: you are missing the OpenGL dev library

                      sudo apt-get install libgl1-mesa-dev

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      D 1 Reply Last reply 27 May 2015, 15:03
                      0
                      • S SGaist
                        27 May 2015, 14:35

                        That one has been covered many times in this forum: you are missing the OpenGL dev library

                        sudo apt-get install libgl1-mesa-dev

                        D Offline
                        D Offline
                        developSomething
                        wrote on 27 May 2015, 15:03 last edited by
                        #13

                        @SGaist
                        It is the same result as above
                        Paketlisten werden gelesen... Fertig
                        Abhängigkeitsbaum wird aufgebaut.
                        Statusinformationen werden eingelesen.... Fertig
                        E: Paket libgl1-mesa-dev kann nicht gefunden werden.

                        I dont know if it has to do wih my Ubuntu 14.04LTS, i downloaded the official iso and made a dvd from it to install on my Lenovo PC
                        so it should be a normal installation?!

                        And a more general question: isn't there a more complete package for qt-installation? I mean this is really the hard way to get one error fixed after the other. One surprise follows the next.
                        I mean without your help i wouldn't be able to get anything done within weeks?!

                        K J 2 Replies Last reply 27 May 2015, 15:19
                        0
                        • D developSomething
                          27 May 2015, 15:03

                          @SGaist
                          It is the same result as above
                          Paketlisten werden gelesen... Fertig
                          Abhängigkeitsbaum wird aufgebaut.
                          Statusinformationen werden eingelesen.... Fertig
                          E: Paket libgl1-mesa-dev kann nicht gefunden werden.

                          I dont know if it has to do wih my Ubuntu 14.04LTS, i downloaded the official iso and made a dvd from it to install on my Lenovo PC
                          so it should be a normal installation?!

                          And a more general question: isn't there a more complete package for qt-installation? I mean this is really the hard way to get one error fixed after the other. One surprise follows the next.
                          I mean without your help i wouldn't be able to get anything done within weeks?!

                          K Offline
                          K Offline
                          koahnig
                          wrote on 27 May 2015, 15:19 last edited by
                          #14

                          @developSomething
                          No, there no more complete packages available.
                          You are struggling with the different components of your linux distro. They may be depend on each distro and have licenses. This cannot be easily distributed within one package. Unfortunately, it is the same as with windows.

                          Vote the answer(s) that helped you to solve your issue(s)

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 27 May 2015, 15:43 last edited by
                            #15

                            One thing you can do that might help is to install the dev packages of Qt from Ubuntu's repository but at this point there seems to be strange things going on. Not finding build-essential is really not normal, what sources does apt use to retrieve the packages ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            D 1 Reply Last reply 27 May 2015, 16:45
                            0
                            • S SGaist
                              27 May 2015, 15:43

                              One thing you can do that might help is to install the dev packages of Qt from Ubuntu's repository but at this point there seems to be strange things going on. Not finding build-essential is really not normal, what sources does apt use to retrieve the packages ?

                              D Offline
                              D Offline
                              developSomething
                              wrote on 27 May 2015, 16:45 last edited by
                              #16

                              this is what the terminal shows:

                              x@x-ThinkCentre-A58:~$ apt
                              apt 1.0.1ubuntu2 für i386, kompiliert am Oct 28 2014 20:57:14
                              Usage: apt [options] command
                              CLI for apt.
                              Basic commands:
                              list - list packages based on package names
                              search - search in package descriptions
                              show - show package details
                              update - update list of available packages
                              install - install packages
                              remove - remove packages
                              upgrade - upgrade the system by installing/upgrading packages
                              full-upgrade - upgrade the system by removing/installing/upgrading packages
                              edit-sources - edit the source information file

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 27 May 2015, 22:39 last edited by
                                #17

                                What does apt-cache search build-essential return ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 27 May 2015, 22:40 last edited by SGaist
                                  #18

                                  Also, what do you have in /etc/apt/sources.list ?

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  D 1 Reply Last reply 28 May 2015, 12:53
                                  0
                                  • S SGaist
                                    27 May 2015, 22:40

                                    Also, what do you have in /etc/apt/sources.list ?

                                    D Offline
                                    D Offline
                                    developSomething
                                    wrote on 28 May 2015, 12:53 last edited by JKSH
                                    #19

                                    @SGaist
                                    What does apt-cache search build-essential return ?

                                    It returns nothing.

                                    and this is the content of /etc/apt/sources.list:

                                    # deb cdrom:[Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release i386 (20150218.1)]/ trusty main restricted
                                    
                                    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                                    # newer versions of the distribution.
                                    
                                    ## Major bug fix updates produced after the final release of the
                                    ## distribution.
                                    
                                    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
                                    ## team. Also, please note that software in universe WILL NOT receive any
                                    ## review or updates from the Ubuntu security team.
                                    
                                    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
                                    ## team, and may not be under a free licence. Please satisfy yourself as to 
                                    ## your rights to use the software. Also, please note that software in 
                                    ## multiverse WILL NOT receive any review or updates from the Ubuntu
                                    ## security team.
                                    
                                    ## N.B. software from this repository may not have been tested as
                                    ## extensively as that contained in the main release, although it includes
                                    ## newer versions of some applications which may provide useful features.
                                    ## Also, please note that software in backports WILL NOT receive any review
                                    ## or updates from the Ubuntu security team.
                                    
                                    
                                    ## Uncomment the following two lines to add software from Canonical's
                                    ## 'partner' repository.
                                    ## This software is not part of Ubuntu, but is offered by Canonical and the
                                    ## respective vendors as a service to Ubuntu users.
                                    # deb http://archive.canonical.com/ubuntu trusty partner
                                    # deb-src http://archive.canonical.com/ubuntu trusty partner
                                    
                                    ## This software is not part of Ubuntu, but is offered by third-party
                                    ## developers who want to ship their latest software.
                                    deb http://extras.ubuntu.com/ubuntu trusty main
                                    deb http://archive.ubuntu.com/ubuntu trusty restricted
                                    deb-src http://extras.ubuntu.com/ubuntu trusty main
                                    
                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 28 May 2015, 23:05 last edited by
                                      #20

                                      Silly question but did you run apt-get updateafter you installed your system ?

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        developSomething
                                        wrote on 29 May 2015, 13:01 last edited by tekojo 6 Jan 2015, 07:17
                                        #21

                                        Now that i have tried everything mentioned another idea came to my mind:

                                        Could it be possible it is my IP which is disliked by ubuntu? therefor only offering certain packages, excluding dev?

                                        (moderation comment: we don't think there is a global conspiracy on Ubuntu packages, and looks like the problem was solved below)

                                        1 Reply Last reply
                                        0
                                        • D developSomething
                                          27 May 2015, 15:03

                                          @SGaist
                                          It is the same result as above
                                          Paketlisten werden gelesen... Fertig
                                          Abhängigkeitsbaum wird aufgebaut.
                                          Statusinformationen werden eingelesen.... Fertig
                                          E: Paket libgl1-mesa-dev kann nicht gefunden werden.

                                          I dont know if it has to do wih my Ubuntu 14.04LTS, i downloaded the official iso and made a dvd from it to install on my Lenovo PC
                                          so it should be a normal installation?!

                                          And a more general question: isn't there a more complete package for qt-installation? I mean this is really the hard way to get one error fixed after the other. One surprise follows the next.
                                          I mean without your help i wouldn't be able to get anything done within weeks?!

                                          J Offline
                                          J Offline
                                          JKSH
                                          Moderators
                                          wrote on 30 May 2015, 00:50 last edited by
                                          #22

                                          Hi,

                                          @developSomething said:

                                          and this is the content of /etc/apt/sources.list:

                                          I see that you don't have any official repositories available. See https://help.ubuntu.com/community/Repositories/Ubuntu to add them. (At the very least, you need the "Main" repository. I also suggest adding "Universe" and "Restricted" to make Ubuntu nicer to useable.)

                                          Then, try downloading the packages again.

                                          isn't there a more complete package for qt-installation? I mean this is really the hard way to get one error fixed after the other. One surprise follows the next.

                                          I've been using Ubuntu as a secondary computer for many years now. All this while, the only things I've needed to do to develop with Qt on Ubuntu are:

                                          1. Install Ubuntu
                                          2. Install g++
                                          3. Install OpenGL development libraries (Mesa)
                                          4. Install Qt

                                          You're having difficulties because your machine has been misconfigured somewhere. (Usually,some repositories are enabled by default as soon as you install Ubuntu.)

                                          Maybe this is kind of a location-based-service, meaning, well...
                                          In my neighborhood there are living a lot of people from all over the world, including many muslims.
                                          Could it be possible it is my IP which is disliked by ubuntu? therefor only offering certain packages, excluding dev?

                                          Given that Canonical wants Ubuntu to spread all over the world, I'd be very surprised if they did this. However, you could ask at https://askubuntu.com to verify.

                                          Anyway, I don't see how Muslims are related to your issue.

                                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                          D 1 Reply Last reply 31 May 2015, 15:23
                                          1

                                          12/24

                                          27 May 2015, 14:35

                                          • Login

                                          • Login or register to search.
                                          12 out of 24
                                          • First post
                                            12/24
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved