Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, I'm using redhat linux, and while I try to install some software application, I'm prompted there is no c compiler in the system, neither cc nor gcc. then i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! diren_006's Avatar
    Join Date
    Jul 2008
    Posts
    5

    Unhappy no c compiler, need to install?


    Hi,

    I'm using redhat linux, and while I try to install some software application, I'm prompted there is no c compiler in the system, neither cc nor gcc.
    then i try to install gcc toolkit, unluckily, the same problem as there is no c compiler in the system.
    I attempt to find the compiler in the system with below command, but got nothing (I login as root)
    find / -name cc -print 2>/dev/null
    or find / -name gcc -print 2>/dev/null

    I understand the c compiler should be shipped with the system, isn't it?
    I seek the help that, is there any possible way to download and install c compiler without compile/build the source codes? directly install the binary version.

    Cheer
    Jacky

  2. #2
    Linux Newbie
    Join Date
    Nov 2007
    Location
    Planet Earth
    Posts
    152
    You can install the gcc compiler from yum package system. Not all systems has a compiler pre-installed, but is easy to install.

    I'm not sure about the exact name of the package, but I think

    Code:
    sudo yum install gcc
    will do the job.

    Hugo
    EOF

  3. #3
    Just Joined! diren_006's Avatar
    Join Date
    Jul 2008
    Posts
    5
    Hi Hugo,

    Thanks for your infor,
    I've downloaded yum-2.0.8-1.src.rpm and
    rpm -i yum-2.0.8-1.src.rpm

    the extracted file is yum-2.0.8-1.tar.gz, and after tar, it's still the scr codes which i need to compile and build.

    Please could you give a more detailed instruction in terms of yum?

    Cheers,
    Jacky

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jun 2008
    Location
    Georgia, USA
    Posts
    117
    Please allow me to ask why are you downloading yum from source code?

    I believe red hat should install it by default upon installation. Correct me if I am wrong. I use Centos and sometimes Fedora.

    Thanks.
    --Willie

  6. #5
    Just Joined! diren_006's Avatar
    Join Date
    Jul 2008
    Posts
    5
    Hi Willie,

    The yum is not mandatory to me, as I just want a C compiler. There is no C compiler within the redhat 9 system
    I ask about yum since Hugo's suggestion.

    Do you have any idea abt the problem as you saw the issue discribed in my first post?

    Cheers,
    Jacky

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    C Compiler is not pre-installed in RedHat and a lot of other distros. You have to install it manually.
    Which version of RedHat are you using?
    What the output of this
    Code:
    yum -y install gcc gcc-c++
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7
    Just Joined! diren_006's Avatar
    Join Date
    Jul 2008
    Posts
    5
    Hi,


    I installed redhat 9
    Hmmm, I've got :- yum: command not found

    So you advice as well I shoud install yum first? if so, i've got the below prob, could u advice?

    Cheers,

    Quote Originally Posted by diren_006 View Post
    Hi Hugo,

    Thanks for your infor,
    I've downloaded yum-2.0.8-1.src.rpm and
    rpm -i yum-2.0.8-1.src.rpm

    the extracted file is yum-2.0.8-1.tar.gz, and after tar, it's still the scr codes which i need to compile and build.

    Please could you give a more detailed instruction in terms of yum?

    Cheers,
    Jacky

  9. #8
    Just Joined! sanjaykatiyar's Avatar
    Join Date
    Mar 2007
    Location
    Bangalore
    Posts
    97
    First insatll yum in your system.
    DAG: yum RPM packages for Red Hat, CentOS and Fedora

    I hope yum-2.0.8-0.1.rh9.rf.noarch.rpm package will work for you.

    $rpm -ivh yum-2.0.8-0.1.rh9.rf.noarch.rpm

    Then try to install gcc using yum.

  10. #9
    Just Joined! diren_006's Avatar
    Join Date
    Jul 2008
    Posts
    5
    thx san, I'll try as per ur instruction and update the thread once done.

Posting Permissions

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