如何在远程服务器上的PHP5上安装cURL

Ste*_*eve 0 php curl

我试图通过我的Mac在远程服务器上安装cURL,但由于某种原因我无法这样做.

以下是我遵循的步骤: -

  1. ssh'ed远程服务器
  2. wget http://curl.haxx.se/download/curl-7.14.0.tar.gz
  3. zcat curl-7.14.0.tar.gz | tar xvf -
  4. cd curl-7.14.0 /
  5. make(给了我错误: - (如下))

    ./configure
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for sed... /usr/bin/sed
    checking for ar... ar
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking curl version... 7.14.0
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for style of include used by make... GNU
    checking for gcc... no
    checking for cc... no
    checking for cc... no
    checking for cl... no
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.
    make: *** [all] Error 1
    
    Run Code Online (Sandbox Code Playgroud)
  6. make install(给我错误)

    make: *** No rule to make target `install'.  Stop.
    
    Run Code Online (Sandbox Code Playgroud)

你能帮助我吗?我只需要在我的服务器上安装cURL.我也试过跑,sudo apt-get install php5-curl但它给了我错误,apt-get不存在.

Mat*_*rte 5

基于我们的convo以及您使用SUSE的事实,看起来您可以简单地使用Zypper(包管理器)来安装它.请尝试以下命令:

zypper install php5-curl
Run Code Online (Sandbox Code Playgroud)

然后,重启apache.

/etc/init.d/apache2 restart
Run Code Online (Sandbox Code Playgroud)