我只需要在我的web服务器上使用PHP的最新cURL版本(7.21.3)。 (与具体的错误修复有关)
在大多数当前的Linux版本库中默认情况下是不可用的。 (Ubuntu的Natty Narwhal是唯一的,它仍然处于testing阶段) – 所以我不能简单地运行“aptitude install php5-curl”或类似的安装它(最新版本的cURL)。
如何安装最新的PHP + cURL包?
是否像在某个库中更改cURL的下载文件一样简单? (即将文本文件的条目从http://curl.haxx.se/download/curl-7.21.0.tar.gz更改为http://curl.haxx.se/download/curl-7.21.3。 tar.gz或其他东西..?)
基本上我需要在Linux上运行PHP的最新的cURL库。 你个人如何去做呢?
添加natty存储库:
$sudo echo "deb http://us.archive.ubuntu.com/ubuntu/ natty main universe multiverse" >> /etc/apt/sources.list $sudo apt-get update
创build/ etc / apt / preferences(将lucid更改为您的版本):
Package: * Pin: release a=natty Pin-Priority: -10 Package: * Pin: release a=lucid Pin-Priority: 900
安装最后的php5-curl:
$sudo apt-get install -t natty php5-curl
testing( curl_version ):
$php -i | grep -i curl cURL Information => 7.21.3 php -r 'var_dump(curl_version());'
或者下载php5和curl源代码并构build。