Ubuntu22.04宝塔安装php始终失败,报错信息如下
checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.
========================================================
Ubuntu 22.04 LTS
\l
Bit:64 Mem:32104M Core:8 gcc:11.3.0 cmake:3.22.1
Linux 5.15.0-71-generic x86_64
ERROR: php-5.6.40 install failed.
错误原因:
Ubuntu 22.04 LTS 默认不包含 libcurl 库文件,需要手动安装
解决方法:
- 打开终端,输入以下命令更新系统软件包列表:
sudo apt update
- 然后输入以下命令安装 libcurl 库文件:
apt-get install curl
apt-get install libcurl4-gnutls-dev
- 添加软连接
sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl
sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/include/curl/curl
- 最后,再尝试安装,应该就能成功了