欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2024-02-14 22:12:04
...
如下:
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

回复内容:

如下:

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

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

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