【问题标题】:How to install PHP extension using PECL (with Homebrew)如何使用 PECL 安装 PHP 扩展(使用 Homebrew)
【发布时间】:2020-12-27 23:55:24
【问题描述】:

我尝试使用 brew 在我的 Mac 上安装 amqp php 扩展。

环境: MacOS Catalina 10.15.6, 自制 2.5.0、PHP 7.4.10、rabbitmq 3.8.8、rabbitmq-c 0.10.0

执行后我收到以下消息:pecl install amqp

checking for pkg-config... /usr/local/bin/pkg-config
checking for amqp using pkg-config... configure: error: librabbitmq not found
ERROR: `/private/tmp/pear/temp/amqp/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-librabbitmq-dir' failed

任何想法如何解决这个问题。

【问题讨论】:

    标签: php rabbitmq homebrew pecl


    【解决方案1】:

    对于任何有类似问题的人。

    问题:

    设置 librabbitmq 安装前缀 [autodetect] 的路径:

    不要留下空答案(自动检测)。

    在我的情况下,将此值设置为

    /usr/local/Cellar/rabbitmq-c/0.10.0

    做好工作。

    【讨论】:

    • 获取rabbitmq-c的路径brew --prefix rabbitmq-c
    猜你喜欢
    • 2023-04-08
    • 1970-01-01
    • 2010-10-15
    • 2010-10-08
    • 2010-12-31
    • 1970-01-01
    • 2011-09-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多