[SOLVED] gcc doesn’t work

Forum Forums New users New Users and General Questions [SOLVED] gcc doesn’t work

Tagged: 

  • This topic has 12 replies, 4 voices, and was last updated Apr 16-4:32 am by paulineb.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #34707
    Member
    paulineb

      hello, i downloaded a tarball and run the configure file,
      this is what i got.

      checking whether the C compiler works… no
      configure: error: in `/home/pab/na’:
      configure: error: C compiler cannot create executables

      what happened and what could i do?
      thank you for any help

      pb

      d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

      • This topic was modified 3 years ago by paulineb.
      • This topic was modified 3 years ago by paulineb.

      pb

      d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

      #34711
      Member
      Xecure
        Helpful
        Up
        0
        ::

        Hello,

        i downloaded a tarball and run the configure file,

        Meaning you downloaded a .tar file that conatined… a program? tar files can contain images, videos, codefiles… More info is needed.

        hecking whether the C compiler works… no
        configure: error: in `/home/pab/na’:
        configure: error: C compiler cannot create executables

        So it contained a program that needs to be compiled. Do you require special libraries to compile it? Maybe you need to install some things first so that you can correctly compile this program. Take a look at the instructions for your program, and the required program/libraries needed.

        • This reply was modified 3 years ago by Xecure. Reason: spelling

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #34714
        Member
        paulineb
          Helpful
          Up
          0
          ::

          thanks for replying.
          yes, tarball with the source of nasm

          pb

          d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

          #34717
          Member
          Xecure
            Helpful
            Up
            0
            ::

            If you can connect to the internet you can install nasm from debian repository
            sudo apt-get install nasm

            antiX Live system enthusiast.
            General Live Boot Parameters for antiX.

            #34718
            Forum Admin
            anticapitalista
              Helpful
              Up
              0
              ::

              sudo apt install nasm

              saves a lot of headaches.

              Philosophers have interpreted the world in many ways; the point is to change it.

              antiX with runit - leaner and meaner.

              #34724
              Member
              paulineb
                Helpful
                Up
                0
                ::

                thanks, it worked!

                but does the trick mean that gcc can’t be fixed?

                pb

                d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

                #34725
                Member
                Xecure
                  Helpful
                  Up
                  0
                  ::

                  thanks, it worked!

                  Sometimes it is better to first see if the program is in the repo. As anticapitalista says, saves a lot of time.

                  but does the trick mean that gcc can’t be fixed?

                  It just means that you are missing libraries or other stuff, or that you don’t have permissions (I don’t know for your exact case). If I want to compile stuff, I first need to have the correct stuff installed. I have compiled some programs and kernel modules and used gcc, make, and other programs which I first had to install (and all compilations worked, so gcc has no problem at least for me). Normally the instructions will tell you what you need to install for the compilation to work.

                  • This reply was modified 3 years ago by Xecure. Reason: spelling

                  antiX Live system enthusiast.
                  General Live Boot Parameters for antiX.

                  #34731
                  Member
                  paulineb
                    Helpful
                    Up
                    0
                    ::

                    j have just now tried to compile the ambitious “hello world” program with this result

                    a.c:1:9: fatal error: stdio.h: No such file or directory
                    #include <stdio.h>
                    ^~~~~~~~~

                    pb

                    d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

                    #34745
                    Member
                    Shaun Holt
                      Helpful
                      Up
                      0
                      ::

                      Have you done a search to find where stdio.h is stored on your drive?

                      Should be ——– /usr/include/stdio.h

                      • This reply was modified 3 years ago by Shaun Holt.
                      #34747
                      Member
                      Xecure
                        Helpful
                        Up
                        0
                        ::

                        a.c:1:9: fatal error: stdio.h: No such file or directory

                        You may need to install build-essential for missing libraries
                        sudo apt install build-essential

                        If after installing it still doesn’t work, reinstall both gcc and build-essential
                        sudo apt install --reinstall gcc build-essential

                        antiX Live system enthusiast.
                        General Live Boot Parameters for antiX.

                        #34752
                        Member
                        paulineb
                          Helpful
                          Up
                          0
                          ::

                          a.c:1:9: fatal error: stdio.h: No such file or directory

                          You may need to install build-essential for missing libraries
                          sudo apt install build-essential

                          If after installing it still doesn’t work, reinstall both gcc and build-essential
                          sudo apt install --reinstall gcc build-essential

                          thanks, it worked and it allowed me to compile package from source.
                          strange that the downloaded distro has gcc preinstalled without libraries

                          pb

                          d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

                          #34757
                          Forum Admin
                          anticapitalista
                            Helpful
                            Up
                            0
                            ::

                            The libraries are not really used by most users (I reckon the vast majority do not compile) so take up unnecessary space, especially since Debian upstream has so many packages ready for install via apt.

                            • This reply was modified 3 years ago by anticapitalista.

                            Philosophers have interpreted the world in many ways; the point is to change it.

                            antiX with runit - leaner and meaner.

                            #34797
                            Member
                            paulineb
                              Helpful
                              Up
                              0
                              ::

                              got it, thanks!

                              pb

                              d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg

                            Viewing 13 posts - 1 through 13 (of 13 total)
                            • You must be logged in to reply to this topic.