进入解压好的php目录后,下载一些常见包
yum -y install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl
问题1.No package ‘sqlite3’ found
[root@localhost php-7.4.24]# yum install sqlite-devel -y
问题2.No package ‘libcurl’ found
前面明明有装过这个
[root@localhost php-7.4.24]# yum -y install libcurl
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* epel: ftp.iij.ad.jp
* extras: mirror.lzu.edu.cn
* updates: ftp.sjtu.edu.cn
软件包 libcurl-7.29.0-59.el7_9.1.x86_64 已安装并且是最新版本
无须任何处理
无果
继续
[root@localhost php-7.4.24]# yum -y install libcurl*
发现是缺了libcurl-devel
======================================================================================================
Package 架构 版本 源 大小
======================================================================================================
正在安装:
libcurl-devel x86_64 7.29.0-59.el7_9.1 updates 303 k
事务概要
======================================================================================================
安装 1 软件包
解决,继续编译
问题3.No package ‘oniguruma’ found
[root@localhost php-7.4.24]# yum install oniguruma -y
还是不行,一番尝试,发现后来-devel的没装
[root@localhost php-7.4.24]# yum -y install oniguruma*
======================================================================================================
Package 架构 版本 源 大小
======================================================================================================
正在安装:
oniguruma-devel x86_64 6.8.2-1.el7 epel 41 k
解决
问题4.configure: error: Please reinstall readline - I cannot find readline.hxue
学聪明了直接加-devel
[root@localhost php-7.4.24]# yum -y install readline-devel
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
成功