Find the answer to your Linux question:
Results 1 to 7 of 7
I'm realitivly new to Linux. I have Mandrake 9.1 and am having trouble compiling programs i download in a gz archive. After I type ./configure, the process stops with an ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2003
    Location
    Wisconsin
    Posts
    16

    compiling from gz archive


    I'm realitivly new to Linux. I have Mandrake 9.1 and am having trouble compiling programs i download in a gz archive. After I type ./configure, the process stops with an error.

    configure: error: no acceptable cc found in $PATH

    I went to find the latest version of GCC, and tried to install that, but it came to this error.

    ./configure: line 8: cc: command not found
    *** The command 'cc -o conftest -g conftest.c' failed.
    *** You must set the environment variable CC to a working compiler.

    This i have no clue on, can anyone help?

    Thanks!

    --Ross

  2. #2
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    First, make sure gcc is in your PATH. If it is, typing
    Code:
    which gcc
    should show you where it is. As far as I know, its normally in the /bin directory (I'm not at a Linux box right now so I can't verify that) and the /bin directory is almost always in your PATH. Once you know that gcc is in your PATH, try
    Code:
    which cc
    If this doesn't give a result, you'll need to make a soft link called 'cc' to your gcc. Assuming gcc is in the /bin directory, do this with
    Code:
    ln -s /bin/gcc /bin/cc
    If that still doesn't work, try setting the environment variable mentioned in the output from ./configure by typing
    Code:
    export CC="/bin/cc"
    At this stage, it should be working but, in my experience, some source code doesn't like being compiled with the latest version of gcc so you might get a version error. If you do, you'll have to get whatever version of gcc its looking for.

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    gcc is normally in /usr/bin. /bin is normally reserved for all but the most critical commands.
    Anyhow, the probable reason for this is that you simply haven't got GCC installed. Pop in your installation CD and install it.

  4. $spacer_open
    $spacer_close
  5. #4
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    Well, he says he already does have gcc installed. So, fair enough then, its in /usr/bin -- just use that instead of /bin in my previous post...
    I'm assuming you already know how to get something into your PATH?

  6. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Add /usr/local/bin /usr/bin /usr/sbin /sbin in your PATH-variable...in ~/.bash_profile or /etc/profile
    Regards

    Andutt

  7. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Oh, sorry, I read the whole post this time.
    Anyhow, he didn't say that he had GCC installed, he only said that he tried to install it, and if I'm right, he tried to install it from source as well. That naturally won't work since you don't have a C compiler. You need to install the binary distribution of GCC from the CDs before you can compile anything else.

  8. #7
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    How's about some feedback from the man himself (Faded Circle)? Has any of the above helped or did you just start the topic to watch everyone else talk amongst themselves? Dolda, for his sake, I hope the conclusion you drew in your last post isn't right! "Hmmm, I've no compiler, I think I'll install one from source..."

Posting Permissions

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