Find the answer to your Linux question:
Results 1 to 6 of 6
How do I find out if I have GCC installed on my linux box. I am root user. Also, if I do have it installed, how do I allow a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    2

    GCC compiler on linux. Do I have it?


    How do I find out if I have GCC installed on my linux box. I am root user. Also, if I do have it installed, how do I allow a user to utilize it without giving him access to root level.

  2. #2
    Just Joined!
    Join Date
    Feb 2005
    Location
    Your SQL Server
    Posts
    95

    Re: GCC compiler on linux. Do I have it?

    Quote Originally Posted by georgebenjamin
    How do I find out if I have GCC installed on my linux box. I am root user. Also, if I do have it installed, how do I allow a user to utilize it without giving him access to root level.
    try

    Code:
    touch lol.c
    gcc lol.c -o test
    and also, you can edit the permissions of the gcc program with chmod:

    Code:
    (in the same dir as gcc, use locate/whereis to find it)
    chmod 755 gcc

  3. #3
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Try:
    Code:
    which gcc
    This should let you know the version number.
    You could also just type
    Code:
    gcc
    at the command line to see if the command is recognized.

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Feb 2005
    Location
    Delft, Holland
    Posts
    95
    This should let you know the version number.
    Actually it only tells you which program is called when you type the command into the shell.

    For the version try:
    gcc -v
    and
    chmod a+x /usr/bin/gcc (or what have you)
    To allow everyone to use the command, I don't really know if this is the right aproach though.

  6. #5
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    just type gcc as a users or root to find out if its installed. users should be able to run gcc without needing priviliged access

  7. #6
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Quote Originally Posted by Morgoth
    Actually it only tells you which program is called when you type the command into the shell.
    Wow, I was way off. I thought it did show which version of gcc was installed. This is what happens when you can't use the internet with Linux (cursed winmodem). I guess you do learn something new everyday.

    By the way, if you are using an rpm based distro try:
    Code:
    rpm -qa | grep gcc
    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

Posting Permissions

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