我正按照https://www.php.net/manual/en/install.unix.nginx.php中的说明尝试在Centos 7上安装php。我的nginx版本:nginx / 1.19.0
我从https://www.php.net/downloads下载了php-7.4.6.tar.gz但在该步骤:
./configure --enable-fpm --with-mysqli
我收到此错误:
checking for sqlite3 > 3.7.4... no
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
No package 'sqlite3' 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.
我确实已启动并运行sqlite3:
# sqlite3
SQLite version 3.7.17
所以,如何设置环境变量(在配置文件中?)?谢谢!
要从源代码进行编译,依赖项需要以可链接的库(有时是新程序用于构建的标头)的形式提供。 -devel
软件包将安装这些库,因此要从具有SQLite支持的源代码构建PHP,您需要安装sqlite-devel
。