no acceptable C compiler found in $PATH when installing python

前端 未结 11 753
野性不改
野性不改 2020-11-28 18:30

I\'m trying to install new python environment on my shared hosting. I follow the steps written in this post:

mkdir ~/src
wget http://www.python.org/ftp/pytho         


        
相关标签:
11条回答
  • 2020-11-28 19:17

    You would need to install it as non root, since its shared hosting. Here is a tut that points how this step. http://luiarthur.github.io/gccinstall

    cd ~/src
    wget http://www.netgull.com/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.gz
    

    or equivalent gcc source, then

    tar -xvf gcc-5.2.0.tar.gz
    cd gcc-5.2.0
    ./contrib/download_prerequisites
    cd ..
    mkdir objdir
    cd objdir
    $PWD/../gcc-5.2.0/configure --prefix=$HOME/gcc-5.2.0 --enable-languages=c,c++,fortran,go
    make
    make install
    

    then add to .bashrc, or equivalent

    export PATH=~/gcc-5.2.0/bin:$PATH
    export LD_LIBRARY_PATH=~/gcc-5.2.0/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=~/gcc-5.2.0/lib64:$LD_LIBRARY_PATH
    
    0 讨论(0)
  • 2020-11-28 19:26

    The gcc compiler is not in your $PATH. It means either you dont have gcc installed or it's not in your $PATH variable.

    To install gcc use this: (run as root)

    • Redhat base:

      yum groupinstall "Development Tools"
      
    • Debian base:

      apt-get install build-essential
      
    0 讨论(0)
  • 2020-11-28 19:26

    Run apt-get install gcc in Suse Linux

    0 讨论(0)
  • 2020-11-28 19:29

    You will need to run

    sudo apt-get install build-essential
    

    first assuming you're on a debain/ubuntu system

    0 讨论(0)
  • 2020-11-28 19:30

    If you are using alphine with docker, do this:

    apk --update add gcc make g++ zlib-dev
    
    0 讨论(0)
提交回复
热议问题