Pythonのインストール時に$PATHに適切なCコンパイラが見つかりません 質問する

Pythonのインストール時に$PATHに適切なCコンパイラが見つかりません 質問する

共有ホスティングに新しいPython環境をインストールしようとしています。この郵便受け:

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/<user>/.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 時間も解決策を見つけようとしていますが、まだ行き詰まっています。

アップデート

ホストゲーターgccは許可しない共有アカウントで:

ベストアンサー1

gcc コンパイラが にありません$PATH。これは、gcc がインストールされていないか、$PATH 変数に含まれていないことを意味します。

gcc をインストールするには、これを使用します: (root として実行)

  • Redhat ベース:

     yum groupinstall "Development Tools"
    
  • Debian ベース:

     apt-get install build-essential
    
  • openSUSE ベース:

     zypper install --type pattern devel_basis
    
  • 高山:

     apk add build-base
    

おすすめ記事