I'm trying to install new python environment on my shared hosting. I follow the steps written in this post:
我正在尝试在我的共享主机上安装新的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
After coming to "./configure --prefix=/home//.localpython" command I get the following output:
来后”。/ 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.
How can this problem be solved? I've been trying to find a solution for 3 hours but still stuck in one place.
如何解决这个问题?我一直试着找一个解决办法,但还是坚持了3个小时。
UPDATE
更新
Hostgator does not allow gcc on their shared accounts: http://support.hostgator.com/articles/pre-sales-questions/compatible-technologies
Hostgator不允许gcc共享它们的共享帐户:http://support.hostgator.com/articles/pre-sales- questions/兼容技术。
7 个解决方案
#1
242
gcc compiler is not in your $PATH
gcc编译器不在您的$PATH中。
it means either you dont have gcc installed or it's not in your $PATH variable
这意味着要么你没有安装gcc,要么它没有在你的$PATH变量中。
to install gcc use this: (run as root)
要安装gcc,请使用以下命令:(以root身份运行)
redhat base:
redhat基地:
yum groupinstall "Development tools"
Debian base:
Debian基地:
apt-get install build-essential
#2
56
you need to run
您需要运行
yum install gcc
#3
55
for Ubuntu / Debian :
对于Ubuntu / Debian:
# sudo apt-get install build-essential
For RHEL/CentOS
对于RHEL / CentOS
#rpm -qa | grep gcc
# yum install gcc glibc glibc-common gd gd-devel -y
or
或
# yum groupinstall "Development tools" -y
More details refer the link
更多细节请参考链接。
#4
37
You will need to run
您需要运行。
sudo apt-get install build-essential
first assuming you're on a debain/ubuntu system
首先假设你在一个debain/ubuntu系统。
#5
7
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.
让某人访问该服务器上的根帐户,以运行sudo apt-get安装-essential。如果您不知道谁有根访问权限,请联系您的共享主机的支持团队并询问他们。
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.
编辑:如果您不允许访问root用户,那么您将无法使其工作。恐怕你得换个主机供应商了。
#6
7
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
您需要安装它作为非根,因为它的共享主机。这是一个图,指出了这一步。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
或者是等效的gcc源。
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
然后添加到.bashrc,或等效的。
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
#7
2
Arch -> sudo pacman -S base-devel
Arch -> sudo pacman - s base-devel。
#1
242
gcc compiler is not in your $PATH
gcc编译器不在您的$PATH中。
it means either you dont have gcc installed or it's not in your $PATH variable
这意味着要么你没有安装gcc,要么它没有在你的$PATH变量中。
to install gcc use this: (run as root)
要安装gcc,请使用以下命令:(以root身份运行)
redhat base:
redhat基地:
yum groupinstall "Development tools"
Debian base:
Debian基地:
apt-get install build-essential
#2
56
you need to run
您需要运行
yum install gcc
#3
55
for Ubuntu / Debian :
对于Ubuntu / Debian:
# sudo apt-get install build-essential
For RHEL/CentOS
对于RHEL / CentOS
#rpm -qa | grep gcc
# yum install gcc glibc glibc-common gd gd-devel -y
or
或
# yum groupinstall "Development tools" -y
More details refer the link
更多细节请参考链接。
#4
37
You will need to run
您需要运行。
sudo apt-get install build-essential
first assuming you're on a debain/ubuntu system
首先假设你在一个debain/ubuntu系统。
#5
7
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.
让某人访问该服务器上的根帐户,以运行sudo apt-get安装-essential。如果您不知道谁有根访问权限,请联系您的共享主机的支持团队并询问他们。
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.
编辑:如果您不允许访问root用户,那么您将无法使其工作。恐怕你得换个主机供应商了。
#6
7
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
您需要安装它作为非根,因为它的共享主机。这是一个图,指出了这一步。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
或者是等效的gcc源。
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
然后添加到.bashrc,或等效的。
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
#7
2
Arch -> sudo pacman -S base-devel
Arch -> sudo pacman - s base-devel。