我一直在尝试使用命令在MacOS High sierra中使用自制软件安装pcntl扩展
brew install homebrew/php/php71-pcntl
brew install homebrew-php/php71-pcntl
还尝试了php54,55,56,70我收到错误
更新Homebrew ...
Error: No available formula with the name "homebrew/php/php7-pcntl"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/php is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/php)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
为什么它没有在我的Mac上找到公式我在我的Mac上有php 7.1.14
从brew成功安装[email protected]后。停止php7.1并启动php7.2
brew services stop [email protected]
brew unlink php71
和
brew services start [email protected]
brew link php72
如果失败,请执行以下操作
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc
在2018年2月和3月,currently supported PHP versions的PHP公式(撰写本文时为5.6,7.0,7.1,7.2)被移至核心Homebrew tap,并于2018年4月PHP存档被存档。
要安装当前的PHP版本(7.2),请使用:
$ brew install php
要安装其他支持的版本之一,请使用:
$ brew install [email protected]
(将5.6
替换为7.0
或7.1
用于其他版本)。
以这种方式安装的所有公式都包含pcntl
扩展,不需要任何其他内容。