我正在尝试在我的共享主机上安装一个新的Python环境。我遵循用this post编写的步骤
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个小时的解决方案,但我仍然被困在一个地方。
更新
他们的共享账户上的Hostgator does not allow gcc:
发布于 2013-11-06 23:54:48
您的$PATH
中没有gcc编译器。这意味着要么你没有安装gcc,要么它不在你的$PATH变量中。
要安装gcc,请使用以下命令:(以root用户身份运行)
yum Tools安装“开发工具”
apt-get install build-essential
发布于 2014-04-24 00:40:43
你需要运行
yum install gcc
发布于 2015-07-06 20:51:53
用于Ubuntu / Debian的 :
sudo apt-get install build-essential
用于RHEL/CentOS的
sudo yum install gcc glibc glibc-common gd gd-devel -y
或
sudo yum groupinstall "Development tools" -y
有关详细信息,请参阅this link。
https://stackoverflow.com/questions/19816275
复制相似问题