“未尝试从源代码安装PHP 7.2时找不到mysql_config”

问题描述 投票:0回答:1

[在Ubuntu上,我目前已从Apache 2.2.32 + PHP 5.4.45 + mySQL 5.1.55进行安装。现在,我想安装PHP 7.2.16。

我下载了.tar.gz文件,并尝试对PHP进行“配置”:

sudo ./configure --prefix=/usr/local/php_7.2.16 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=/usr/local/mysql --with-gettext --with-curl

((显然,它与PHP 5.4一起使用,并且带有另一个目录)

但是,我现在收到以下错误消息:

mysql_config not found
configure: error: Please reinstall the mysql distribution

我必须从头开始重新安装mySQL还是有任何解决方法来避免这种情况?谢谢。

php mysql ubuntu install lamp
1个回答
0
投票

[mysql_config通过mysql-devel安装。如果运行mysql_config,它将返回给您所有用于编译客户端的选项。如果从软件包安装它,它应该在/ usr / bin / mysql_config之类的地方。并且当源代码编译php时,您可以在[

下传递mysql_config的路径
--with-mysqli=/usr/bin/mysql_config
© www.soinside.com 2019 - 2024. All rights reserved.