IT story

파이썬 설치시 $ PATH에 허용되는 C 컴파일러가 없습니다.

hot-time 2020. 5. 10. 10:27
반응형

파이썬 설치시 $ PATH에 허용되는 C 컴파일러가 없습니다.


공유 호스팅에 새로운 파이썬 환경을 설치하려고합니다. 이 게시물에 쓰여진 단계를 따릅니다 .

mkdir ~/src
wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz
tar -zxvf Python-2.7.1.tar.gz
cd Python-2.7.1
mkdir ~/.localpython
./configure --prefix=/home/<user>/.localpython
make
make install

"./configure --prefix = / home //. localpython"명령에 도달하면 다음과 같은 결과가 나타납니다.

checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux3
checking EXTRAPLATDIR... 
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home3/mikos89/Python-2.7.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

이 문제를 어떻게 해결할 수 있습니까? 나는 3 시간 동안 해결책을 찾으려고 노력했지만 여전히 한곳에서 붙어 있습니다.

최신 정보

Hostgator는 공유 계정에서 gcc를 허용하지 않습니다 : http://support.hostgator.com/articles/pre-sales-questions/compatible-technologies


gcc 컴파일러가에 없습니다 $PATH. gcc가 설치되어 있지 않거나 $ PATH 변수에 있지 않다는 것을 의미합니다.

gcc를 설치하려면 다음을 사용하십시오. (루트로 실행)

  • 레드햇베이스 :

    yum groupinstall "Development Tools"
    
  • 데비안베이스 :

    apt-get install build-essential
    

당신은 실행해야합니다

yum install gcc

우분투 / 데비안 :

# sudo apt-get install build-essential

RHEL / CentOS 용

#rpm -qa | grep gcc
# yum install gcc glibc glibc-common gd gd-devel -y

또는

 # yum groupinstall "Development tools" -y

More details refer the link


You will need to run

sudo apt-get install build-essential

first assuming you're on a debain/ubuntu system


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

Get someone with access to the root account on that server to run sudo apt-get install build-essential. If you don't know who has root access, contact the support team for your shared hosting and ask them.

Edit: If you aren't allowed access to root, you aren't ever going to get it working. You'll have to change hosting provider I'm afraid.


If you are using alphine with docker, do this:

apk --update add gcc make g++ zlib-dev

Run apt-get install gcc in Suse Linux


Arch -> sudo pacman -S base-devel

참고URL : https://stackoverflow.com/questions/19816275/no-acceptable-c-compiler-found-in-path-when-installing-python

반응형