首頁  >  文章  >  後端開發  >  brew 安装xhprof失败,请问怎么解决

brew 安装xhprof失败,请问怎么解决

WBOY
WBOY原創
2016-06-06 20:38:581089瀏覽

如下:

<code>brew install php56-xhprof
==> Installing php56-xhprof from homebrew/homebrew-php
==> Downloading https://github.com/facebook/xhprof/archive/254eb24dcfa763c76c57b472093ebc4b81af2b7d.tar.gz
######################################################################## 100.0%
==> Patching
Error: Unable to guess PHP branch for Formulary::Formulae::Php56Xhprof
</code>

回复内容:

如下:

<code>brew install php56-xhprof
==> Installing php56-xhprof from homebrew/homebrew-php
==> Downloading https://github.com/facebook/xhprof/archive/254eb24dcfa763c76c57b472093ebc4b81af2b7d.tar.gz
######################################################################## 100.0%
==> Patching
Error: Unable to guess PHP branch for Formulary::Formulae::Php56Xhprof
</code>

应该是PHP版本有问题,homebrew-php的源码,你尝试安装一下5.3+的版本。

<code>def php_branch
    class_name = self.class.name.split("::").last
    matches = /^Php5([3-9]+)/.match(class_name)
    if matches
      "5." + matches[1]
    else
      raise "Unable to guess PHP branch for #{class_name}"
    end
  end
</code>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn