PHP 7.4 configure 错误 configure: error: Package requirements (sqlite3 > 3.7.4) were not met
问题描述
在 Linux 编译 php-7.4.6,./configure --prefix=/develop/
,最后出现以下错误。
checking for sqlite3 > 3.7.4... no
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
Package 'sqlite3', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解决方法
需要安装 sqlite-devel
,可以手动安装或者命令行安装。
1. 手动安装
在 https://pkgs.org/search/?q=sqlite-devel 页面中,找到与操作系统相对应的 sqlite-devel
版本,并下载安装。
2. 命令行安装
如 Ubuntu / Debian:
sudo apt-get install libsqlite3-dev
RHEL / CentOS
sudo yum install sqlite-devel