用brew安装PHP扩展时报错nvalid attribute for formula 'homebrew/php/php71?
在我重新安装了PHP71后
报错内容如下:
包括安装reids,mongodb扩展也是,任何扩展也装不上。
huangwhMac:php huangwh$ brew install php71-igbinary
Updating Homebrew...
==> Installing php71-igbinary from homebrew/php
Error: invalid attribute for formula 'homebrew/php/php71': version (nil)
/usr/local/Homebrew/Library/Homebrew/formula.rb:252:in `validate_attributes!'
/usr/local/Homebrew/Library/Homebrew/formula.rb:199:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:88:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:88:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:275:in `factory'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:33:in `to_formula'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:96:in `block in expand'
/usr/local/Homebrew/Library/Homebrew/dependency.rb:83:in `expand'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1473:in `recursive_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1485:in `runtime_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:416:in `runtime_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:429:in `expand_requirements'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:364:in `compute_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:136:in `verify_deps_exist'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:129:in `prelude'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:335:in `install_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:226:in `block in install'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:224:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:224:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95:in `<main>'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1.首先你要确定你已经
brew update
了。2.其次你可以在命令行运行
brew install php71-igbinary --build-from-source
3.可以在
--build-from-source
后面追加--HEAD
或者--devel
4.可能是你的Homebrew 版本过低,尝试重装:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
如果仍然不行的话,可以@我