私はCentOS 7を使用しています。インストールしたばかりの新しいopensslパッケージでPythonを再構築したいのですが、コンパイルできないようです。私はこれを実行しました
sudo yum groupinstall "Development Tools"
正常に実行されます。しかし、Pythonをビルドするときに./configureを実行すると問題が発生します...
(venv) [rails@server Python-3.7.0]$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.7... python3.7
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/Python-3.7.0':
configure: error: C compiler cannot create executables
Python 3をビルドするにはどうすればよいですか?
編集する:コメントに応じて要求された情報...
(venv) [rails@server Python-3.7.0]$ findmnt --target /tmp/Python-3.7.0
TARGET SOURCE FSTYPE OPTIONS
/ /dev/simfs[/home/vz/private/20428] simfs rw,relatime
ベストアンサー1
venvは環境を大幅に変更するため、Pythonをビルドする前に仮想環境を残す必要があります。プロンプトは、現在Python仮想環境にあることを示します。
設定が失敗した場合、通常はログファイルに特定のエラーメッセージが記録されます。根本原因を見つけるには、ログファイルを確認してください。
最新バージョンのCentOS 7にはdnfが含まれています。次のコマンドを使用してビルド要件をインストールできます。
dnf builddep python3