关于php:mac安装php扩展yaml

16次阅读

共计 845 个字符,预计需要花费 3 分钟才能阅读完成。

首先装置 libyaml

$ brew install libyaml

==> Downloading https://ghcr.io/v2/homebrew/core/libyaml/manifests/0.2.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libyaml/blobs/sha256:a436da33a05f805258c5951a365dec4e8d70a908dbe5dacdeb6b2ecd0efd5024
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a436da33a05f805258c5951a365dec4e8d70a908dbe5dacdeb6b2ecd0efd5024?se=2021-11-05T09%3A00%3
######################################################################## 100.0%
==> Pouring libyaml--0.2.5.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libyaml/0.2.5: 10 files, 353KB

记录一下这一步里的 libyaml 门路:

/opt/homebrew/Cellar/libyaml/0.2.5

而后装置 yaml

$ pecl install yaml
.......
Please provide the prefix of libyaml installation [autodetect] : 

粘贴上一步失去的 libyaml 门路

装置实现,检查一下

$ php -m | grep yaml
yaml
正文完
 0