Announcement

Collapse
No announcement yet.

is gcc 4.6.3 included with Kubuntu 12.04 LTS?

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

    is gcc 4.6.3 included with Kubuntu 12.04 LTS?

    If gcc 4.6.3 is included with Kubuntu 12.04 LTS, in wich directory does it live? I'm new at this. Yesterday I installed Kubuntu 12.04 LTS on my old IBM! ThinkPad G41. I had created for this purpose a 200 GB and a 2GB partition on a 320 GB hard disk. I now have a dual-boot setup for Kubuntu and Windows XP. From reading some release-notes-like document it seemed to me that Kubuntu 12.04 comes with the compiler gcc 4.6.3 included. Today, after Nepomuk was done indexing the files on my Kubuntu partition, I searched for files which had gcc in their names. All I found were approximately 18 files in folders /usr/src/linux-headers-3.2.0-2n* where n = 3 or 4. That made me wonder if only gcc ver 3.2.0 is included instead of 4.6.3. Is that true? If gcc 4.6.3 is actually included please tell me in which directory it is stored. Thanks! Vim

    #2
    $ apt-cache policy gcc
    gcc:
    Installed: 4:4.6.3-1ubuntu5
    Candidate: 4:4.6.3-1ubuntu5
    Version table:
    *** 4:4.6.3-1ubuntu5 0
    500 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/ precise/main amd64 Packages
    100 /var/lib/dpkg/status

    $ locate gcc

    produces a long list, including /usr/bin/gcc-4.6

    Comment


      #3
      Just open a console and type:
      Code:
      sudo apt-get update && sudo apt-get install gcc
      If gcc is already installed, your will be told so. If it isn't installed, it will be.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Originally posted by ronw View Post
        $ apt-cache policy gcc
        ... [snip] ...
        Using that command I learned that gcc had not been installed on my system. Thanks!

        Comment


          #5
          Originally posted by Snowhog View Post
          Just open a console and type:
          Code:
          sudo apt-get update && sudo apt-get install gcc
          ... [snip] ...
          That resulted in the installation of gcc 4.6.3. I was pleased about that!

          What does && do in a command like the one you provided above? Author Mark Sobell in A Practical Guide to Linux indicates that a single & at the end of a command will result in that command executing in the background, without output in the terminal. But that still made me wonder what the answer is to my question involving &&.

          Does it 'break' (another) kubuntu forums thread if, in the middle of it, I change its title? Thanks for all your help! Vim

          Comment


            #6
            Originally posted by Vim View Post
            That resulted in the installation of gcc 4.6.3. I was pleased about that!

            What does && do in a command like the one you provided above? Author Mark Sobell in A Practical Guide to Linux indicates that a single & at the end of a command will result in that command executing in the background, without output in the terminal. But that still made me wonder what the answer is to my question involving &&.

            Does it 'break' (another) kubuntu forums thread if, in the middle of it, I change its title? Thanks for all your help! Vim
            1 & runs the program 1 in the background (it still prints to the terminal so can cause the terminal to get noisy, most people use &>/dev/null & to get rid of the stdout and stderr to make it quite). You can also combine commands so they all start at the same time 1 & 2 & 3 will execute programs 1 and 2 in the background and 3 in the foreground.

            1 && 2 means run 1 and if 1 exits successfully run 2 but if 1 fails (with a return code of something other then 0) then don't run 2.

            Try this example:
            Code:
            true && echo "True"
            false && echo "False"
            The true command returns with an exit code of 0 and false with one of 1 (I like the man page entries for these commands )

            In addition to && there is also 1 || 2 which means run 1 and if and only if it fails then run 2. It is useful in scripts for doing things like command || exit 1 which will terminate the script it command fails to complete successfully.

            Try this example:
            Code:
            true || echo "True"
            false || echo "False"
            See if you can guess what this one will do:
            Code:
            (sleep 2 && echo 2) & (sleep 1 && echo 1) & (sleep 3 && echo 3)
            Last edited by james147; May 10, 2012, 01:37 PM.

            Comment


              #7
              Originally posted by james147 View Post
              ... [snip] ...

              Try this example:
              Code:
              true && echo "True"
              false && echo "False"
              ... [snip] ...

              Try this example:
              Code:
              true || echo "True"
              false || echo "False"
              See if you can guess what this one will do:
              Code:
              (sleep 2 && echo 2) & (sleep 1 && echo 1) & (sleep 3 && echo 3)
              I tried the first 2 examples and predicted the output correctly. For the 3rd (last) example I guessed this output:

              1
              2
              3

              However I got:

              [1] 14305
              [2] 14306
              1
              2
              3
              [1]- Done ( sleep 2 && echo 2 )

              After I get printing from within 12.04 to work I intend to print your much appreciated tutorial and paste it in one of my 2 books by Mark Sobel.

              Comment


                #8
                Originally posted by Vim View Post
                [1] 14305
                [2] 14306
                1
                2
                3
                [1]- Done ( sleep 2 && echo 2 )
                the lines that start with with [X] in are job notifications the first two telling you jobs 1 and 2 have been started and the last telling you job 1 has finished. Read more about it here.

                If you pipe the each command in last example to a text file you can split the output:
                Code:
                [B]% (sleep 2 && echo 2) >> test & (sleep 1 && echo 1) >> test & (sleep 3 && echo 3) >> test[/B][1] 7934
                [2] 7936
                [2]  + done       ( sleep 1 && echo 1; ) >> test
                [1]  + done       ( sleep 2 && echo 2; ) >> test
                [B]% cat test[/B]
                1
                2
                3
                [B]% 
                [/B]
                Last edited by james147; May 11, 2012, 06:48 AM.

                Comment


                  #9
                  Originally posted by james147 View Post
                  the lines that start with with [X] in are job notifications the first two telling you jobs 1 and 2 have been started and the last telling you job 1 has finished. Read more about it here. ...[snip]...
                  I looked up that reference and found that it was referred to in this Overview Documentation for Bash which, in turn, was referred to in this list of documentation about programs from the Free Software Foundation's GNU project. Currently, my use of Firefox in Kubuntu 12.04 LTS frequently causes 12.04 to freeze. After I have found a fix or work-around for that problem I intend to bookmark the reference you gave me and the two I found. Thanks for your mentorship! Vim

                  PS - I wonder whether it would 'break' a thread like this one if, in the middle of it, I would change its title.

                  Comment

                  Working...
                  X