【问题标题】:How to Install cURL on PHP5 on a remote Server如何在远程服务器上的 PHP5 上安装 cURL
【发布时间】:2013-06-18 20:46:11
【问题描述】:

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

这是我遵循的步骤:-

  1. SSH 远程服务器
  2. wget http://curl.haxx.se/download/curl-7.14.0.tar.gz
  3. zcat curl-7.14.0.tar.gz |焦油 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
    
  6. 进行安装(给了我错误)

    make: *** No rule to make target `install'.  Stop.
    

你们能帮我解决这个问题吗?我只需要在我的服务器上安装 cURL。我也尝试运行sudo apt-get install php5-curl,但它给了我apt-get不存在的错误。

【问题讨论】:

  • 这是什么 Linux 发行版?你试过sudo yum install php5-curl吗?
  • 试过了,它说 sudo: yum: command not found。发行版是:- SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 1
  • 哎呀,听起来像一个漂亮的准系统 linux 安装。我会先安装一个包管理器...
  • 谢谢马特,你能详细说明一下如何安装包管理器吗?
  • 实际上看起来 SUSE 使用的是 zypper。试试zypper info php5-curlen.opensuse.org/images/3/30/Zypper-cheat-sheet-2.pdf

标签: php curl


【解决方案1】:

根据我们的 convo 以及您使用 SUSE 的事实,您似乎可以简单地使用 Zypper(包管理器)来安装它。试试下面的命令:

zypper install php5-curl

然后,重启 apache。

/etc/init.d/apache2 restart

【讨论】:

    【解决方案2】:

    所以,这就是我所做的。

    logged in with ssh
    
    sudo zypper in curl
    
    sudo /sbin/yast -i curl
    
    zypper in php5-curl
    
    sudo service apache2 restart
    

    非常感谢马修。

    【讨论】:

      猜你喜欢
      • 2011-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多