2

I'm trying to install Python-3.6.5 on a machine that does not have any package manager installed, like apt-get or yum. I do have root access.

I can wget Python, but when I run the ./configure, I get the following error:

configure: error: no acceptable C compiler found in $PATH

Okay, so next I try to install GCC. I follow these instructions:

cd /bin
wget http://www.netgull.com/gcc/releases/gcc-4.8.5/gcc-4.8.5.tar.gz
tar -xvf gcc-4.8.5.tar.gz
cd gcc-4.8.5
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.5/configure --prefix=$HOME/gcc-4.8.5 --enable-languages=c,c++,fortran,go

And on that last command, I once again get:

configure: error: no acceptable C compiler found in $PATH

Lots of googling and reading led me to suggestion to add CC=/usr/bin/gcc like so:

CC=/usr/bin/gcc-x $PWD/../gcc-4.8.5/configure --prefix=$HOME/gcc-4.8.5 --enable-languages=c,c++,fortran

That gets me a new error:

configure: error: C compiler cannot create executables

Any ideas here? I'm really at a loss here, I've spent a long time trying to figure this one out and it's annoying me to no end.

5
  • 1
    Can you post the relevant log output from the configure run? Also, something is really whack with your system if a proper C compiler is not in PATH. Commented Jul 2, 2018 at 19:18
  • 1
    Compile Python and/or GCC on a different system and copy the binaries onto yours. Commented Jul 2, 2018 at 19:33
  • It would help if we knew what kind of Linux system this is. Something like this is very OS dependent. I could see it being Arch Linux though. Just a guess. Commented Jul 2, 2018 at 20:02
  • 1
    Read through config.log to see why it thinks your system-installed gcc is broken. Most likely, that system-installed gcc is in fact broken, and, well, not being able to compile things without a working compiler shouldn't be any kind of a surprise. Commented Jul 2, 2018 at 20:40
  • 1
    I kept fighting with it and it turns out gcc was installed but there was a stupid PATH problem that was causing the issue. I should have gone down that path (get it) sooner Commented Jul 3, 2018 at 13:52

1 Answer 1

3

Try this

sudo apt-get install build-essential

It must be fix. (Referred here)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.