【发布时间】:2019-08-20 18:47:29
【问题描述】:
在 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.net/manual/en/mysqli.installation.php),发现我必须指出'mysql_config'的路径。我试过:sudo ./configure --prefix=/usr/local/php_7.2.16 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=/usr/local/mysql-5.1。 55/bin/mysql_config --with-gettext --with-curl 成功了
标签: php mysql ubuntu installation lamp