Announcement

Collapse
No announcement yet.

GCC doesn't function

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GCC doesn't function

    I have just installed the Kubuntu and wanted to compile a c programm i wrote.
    When I call gcc grom shell I get the messagge like> bash gcc not found or smh like that.
    I have checked in Adept and it stays taht gcc is installed...

    How can I compile my c programms?

    And yeh,
    I an quite new in Linux.

    Thanks a lot

    #2
    Re: GCC doesn't function

    Start by installing 'build-essential' package (if it's not installed)

    If that doesn't help, post the exact error message you get.

    Comment


      #3
      Re: GCC doesn't function

      Ok, new problems. I have not the package 'build essential'. I tried to search for it, but i am not sure which one should i download and install. Can u please post me the proper link?
      I would jhave one more question.
      For example, i have downloaded the 'build essential 11.3.tar.gz'.
      If that were the right one, how would i inastall it? I mean, where to save , shoul i unpack it and so on...

      The exact message i get is> bash:gcc: command not found
      , although i checked and gcc is installed.

      thanks

      Comment


        #4
        Re: GCC doesn't function

        Originally posted by weilermann
        Ok, new problems. I have not the package 'build essential'. I tried to search for it, but i am not sure which one should i download and install. Can u please post me the proper link?
        Software is usually installed with a package manager (which takes care of everything, you don't need to download anything)

        Adept is the default package manager in kubuntu, you can start it with
        1. Alt+F2
        2. kdesu adept
        (it should be on the k-menu as well)

        You can also install build-essential from the command line with:
        Code:
        sudo apt-get update && sudo apt-get install build-essential
        If you can't install it, post the output of the above command so we can troubleshoot.

        More information on installing software:
        http://doc.ubuntu.com/kubuntu/deskto...lications.html
        http://psychocats.net/ubuntu/installingsoftware

        The Desktop Guide is also available offline:
        K-menu>Help>Kubuntu Desktop Guide

        Comment


          #5
          Re: GCC doesn't function

          I tried both. It seams i have all packages inastalled(all listed packages are iistalled). I tried to view all uninstalled packages and the list was empty.

          From the command line i got this output:

          Reading package list...done
          E: Could not open lock file /var/lib/dpkg/lock -open(13 permissin denied)
          E: Unable to lock the administration directory /var/lib/dpkg/ are you root?

          I have also roblems with setting up the dial up connection. I tried (and did)
          set up a new connection, but when i start kppp i get the mess : /etc/rersolv.conf is missing or cant be read!

          I think the most improtant for me at this moment is to get internet connection, cause it seams to be not very convinient to switch between windows and Kubuntu allwazs when i need to check smth and i could post the required informations immidiately.

          thanks a looot


          Comment


            #6
            Re: GCC doesn't function


            I tried again.
            From the commmand line...and the output I get i exactly

            Reading package lists....Done
            Building dependency tree...Done
            E: Couldn't find package build-essential

            What should i do?

            Thanks a lot

            Comment


              #7
              Re: GCC doesn't function

              Originally posted by weilermann
              Reading package list...done
              E: Could not open lock file /var/lib/dpkg/lock -open(13 permissin denied)
              E: Unable to lock the administration directory /var/lib/dpkg/ are you root?
              This error usually means you have another package manager open when you try to apt-get. Adept perhaps?

              Originally posted by weilermann
              Reading package lists....Done
              Building dependency tree...Done
              E: Couldn't find package build-essential
              Ah sorry, since you don't have a working internet connection in kubuntu, apt-get can't connect to the online repositories. Better get your internet connection working first.
              (You can also use the alternate Install CD as an offline repository and you can install build-essential with it, but since an internet connection is pretty vital it is a good place to start)

              Unfortunately I don't know much about kppp or how to troubleshoot a modem connection, perhaps someone can give you a step-by-step guide on it...I don't want to guess

              Comment


                #8
                Re: GCC doesn't function

                Thanks a lot,
                i am reading diff thing i can find in internet and hope to get soon my c programms compiled .
                I have already posted my dial up connection problem, so i might get help
                As u said and i have read-- it wouldnt be a problem if i had internet connection...

                I hope to manage it soon. I cantswitch to windows everytime i need internet...

                Thank once more

                Comment

                Working...
                X