Find the answer to your Linux question:
Results 1 to 4 of 4
hey guys... got a load of probs. i installed gcc-4.1, gcc-4.1-base, etc., etc. but i can't compile anything?? why? 'gcc' 'g++' commands aren't recognized!...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Location
    Sri Lanka
    Posts
    12

    gcc-4.1 installed..NOT working??!!

    hey guys...

    got a load of probs.

    i installed gcc-4.1, gcc-4.1-base, etc., etc. but i can't compile anything?? why? 'gcc' 'g++' commands aren't recognized!

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    Did you install the package build-essential ?

    Also, make sure both /usr/bin/g++ and /usr/bin/gcc are properly linked (probably to /usr/bin/g++-4.1 and /usr/bin/gcc-4.1).
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Location
    Sri Lanka
    Posts
    12
    thanks. i installed build-essential.
    ....
    you said:
    Also, make sure both /usr/bin/g++ and /usr/bin/gcc are properly linked (probably to /usr/bin/g++-4.1 and /usr/bin/gcc-4.1).
    ....

    how do i do that pls?

  4. #4
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    For example, the output of :
    Code:
    ls -l /usr/bin/g++
    shoud be :
    lrwxrwxrwx 1 root root 7 2007-01-08 11:52 /usr/bin/g++ -> g++-4.1
    If it isn't, then simply do that :
    Code:
    cd /usr/bin
    ln -sf g++-4.1 g++
    And very again with ls -l /usr/bin/g++ that it worked.

    You can do the same with /usr/bin/gcc
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •