Compiling php with curl, where is curl installed?(用curl编译php,curl安装在哪里?)
问题描述
用--with-curl=
curl 二进制文件位于 /usr/bin/curl
The curl binary is located at /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/... 和其他不相关的文件
更新
尝试了 --with-curl=/usr/lib64
和 --with-curl=/usr/lib
虽然我很确定它是 64 位的.
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/
解决方案
PHP 需要 curl-devel
PHP requires curl-devel
推荐答案
这些都不允许您在启用 cURL 的情况下编译 PHP.
None of these will allow you to compile PHP with cURL enabled.
为了使用 cURL 进行编译,您需要 libcurl 头文件(.h 文件).它们通常位于 /usr/include/curl
中.它们通常捆绑在一个单独的开发包中.
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.
例如,在 Ubuntu 中安装 libcurl:
Per example, to install libcurl in Ubuntu:
sudo apt-get install libcurl4-gnutls-dev
或 CentOS:
sudo yum install curl-devel
然后你可以这样做:
./configure --with-curl # other options...
如果您手动编译 cURL,您可以指定不带 lib
或 include
后缀的文件路径.(例如:/usr/local
如果 cURL 标头在 /usr/local/include/curl
中).
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安装在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:用curl编译php,curl安装在哪里?


基础教程推荐
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- PHP 守护进程/worker 环境 2022-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01