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安装在哪里?
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP - if 语句中的倒序 2021-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
