用curl编译php,curl是在哪里安装的? [英] Compiling php with curl, where is curl installed?

查看:1000
本文介绍了用curl编译php,curl是在哪里安装的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在使用编译PHP时指定目录 - with-curl =



curl二进制位于 / usr / bin / curl



curl -V 给我

  curl 7.15.5(x86_64-redhat-linux-gnu)libcurl / 7.15.5 OpenSSL / 0.9 .8b zlib / 1.2.3 libidn / 0.6.5 

locate curl 给我

  / usr / bin / curl 
/usr/lib/libcurl.so .3
/usr/lib/libcurl.so.3.0.0
/usr/lib64/libcurl.so.3
/usr/lib64/libcurl.so.3.0.0

已移除/ usr / share / ...和其他不相关的档案

>

UPDATE



尝试 - with-curl = / usr / lib64 - with-curl = / usr / lib ,但我确定它是64位。

 检查cURL支持...是
检查是否应该对URL流使用cURL ... no
检查cURL默认路径...未找到
configure:错误:请重新安装libcurl分发 -
easy.h应该在< curl-dir> / include / curl /



解决方案



PHP需要curl-devel

解决方案

这些都不允许您使用cURL来编译PHP。



为了使用cURL编译,需要libcurl头文件(.h文件)。它们通常位于 / usr / include / curl 中。



例如,在Ubuntu中安装libcurl:

  sudo apt-get install libcurl4-gnutls-dev 


$ b b

或CentOS:

  sudo yum install curl-devel 
pre>

然后你可以:

  ./ configure  - -with-curl#其他选项... 

如果手动编译cURL,到包含 lib include 后缀的文件。 (例如: / usr / local if cURL headers in / usr / local / include / curl )。 p>

I need to specify a directory when compiling php with --with-curl=

The curl binary is located at /usr/bin/curl

curl -V gives me

curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

locate curl gives me

/usr/bin/curl
/usr/lib/libcurl.so.3
/usr/lib/libcurl.so.3.0.0
/usr/lib64/libcurl.so.3
/usr/lib64/libcurl.so.3.0.0

removed /usr/share/... and other irrelevant files

UPDATE

Tried --with-curl=/usr/lib64 and --with-curl=/usr/lib although I'm pretty sure it's 64 bit.

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/

SOLUTION

PHP requires curl-devel

解决方案

None of these will allow you to compile PHP with cURL enabled.

In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl. They generally are bundled in a separate development package.

Per example, to install libcurl in Ubuntu:

sudo apt-get install libcurl4-gnutls-dev

Or CentOS:

sudo yum install curl-devel

Then you can just do:

./configure --with-curl # other options...

If you compile cURL manually, you can specify the path to the files without the lib or include suffix. (e.g.: /usr/local if cURL headers are in /usr/local/include/curl).

这篇关于用curl编译php,curl是在哪里安装的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆