MacOs安装php扩展

以protobuf为例

  1. 下载安装包
    git clone https://github.com/allegro/php-protobuf
  2. 进入文件路径
  3. 执行phpize
    /usr/local/opt/php@7.2/bin/phpize
    (自己电脑的安装路径)
  4. 执行php-config
    ./configure --with-php-config=/usr/local/opt/php@7.2/bin/php-config
  5. make
  6. make install
  7. vim php.ini
    extension=protobuf
posted @ 2023-07-26 11:46  objecter  阅读(161)  评论(0)    收藏  举报