无法在mac high sierra的homebrew上找到pcntl

时间:2018-05-21 05:44:48

标签: php macos-high-sierra pcntl

我一直在尝试使用命令

在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

2 个答案:

答案 0 :(得分:1)

一旦成功从brew安装php@7.2。停止php7.1并启动php7.2

brew services stop php@7.1
brew unlink php71

brew services start php@7.2
brew link php72

如果失败,请运行以下

  echo 'export PATH="/usr/local/opt/php@7.2/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/php@7.2/sbin:$PATH"' >> ~/.zshrc

答案 1 :(得分:-1)

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 php@5.6

(将5.6替换为7.07.1替换其他版本。)

以这种方式安装的所有公式都包含pcntl扩展名,不需要任何其他内容。

相关问题