【问题标题】:while installing php driver for mongodb for xampp on osx ERROR: `phpize' failed在 osx 上为 xampp 安装 mongodb 的 php 驱动程序时 ERROR: `phpize' failed
【发布时间】:2016-03-18 04:41:01
【问题描述】:

我用 brew 安装了 mongodb。 在 osx 上为 xampp 安装 mongodb 的 php 驱动程序时

我使用了这个命令:sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo

错误:`phpize' 失败

终端完全错误

WARNING: "pecl/mongo" is deprecated in favor of "channel:///mongodb"
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading mongo-1.6.12.tgz ...
Starting to download mongo-1.6.12.tgz (209,252 bytes)
.............................................done: 209,252 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed

【问题讨论】:

  • 我使用了这个命令:sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo

标签: php macos mongodb driver


【解决方案1】:

我找到了解决方案:它对我有用。

  1. 下载自动配置文件
    curl http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz > autoconf.tar.gz

  2. 解压 autoconf 存档
    tar -xvzf autoconf.tar.gz

  3. 配置和制作——注意未归档的文件夹可能有不同的名称。

    cd autoconf-2.69

    ./configure

    sudo make && sudo make install

  4. 这会将 autoconf 安装到“/usr/local/bin/autoconf”。为了让 phpize 工作,请将 PHP_AUTOCONF 环境变量设置为指向新安装的 autoconf。
    export PHP_AUTOCONF=/usr/local/bin/autoconf

【讨论】:

    猜你喜欢
    • 2015-07-24
    • 2015-02-22
    • 2023-03-27
    • 2012-12-04
    • 2016-09-01
    • 1970-01-01
    • 2018-06-19
    • 2012-05-30
    • 2016-09-05
    相关资源
    最近更新 更多