brew安装php70出现configure:error:Cannotfindlibz错误解决方法

本文出自 “php ecshop 二次开发” 博客,请务必保留此出处http://phpecshop.blog.51cto.com/6296699/1883448


根据《全新安装Mac OS Sierra (10.12)并使用HomeBrew安装ZSH + MNMP (Mac + Nginx + MySQL + Php) 开发环境》教程在mac下用brew安装php70出错。

brew install php70 --with-debug --with-gmp --with-homebrew-curl --with-homebrew-libressl --with-homebrew-libxml2 --with-homebrew-libxslt --with-imap --with-libmysql --with-mysql

出错信息:

创新互联建站网站建设公司是一家服务多年做网站建设策划设计制作的公司,为广大用户提供了网站设计、网站制作,成都网站设计,广告投放平台,成都做网站选创新互联建站,贴合企业需求,高性价比,满足客户不同层次的需求一站式服务欢迎致电。

configure: error: Cannot find libz

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/josegonzalez/homebrew-php/issues

/usr/local/Homebrew/Library/Homebrew/utils/github.rb:226:in `raise_api_error': Validation Failed (GitHub::Error)
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:184:in `open'
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:233:in `issues_matching'
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:266:in `issues_for_formula'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:325:in `fetch_issues'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:321:in `issues'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:383:in `dump'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:133:in `rescue in 
'     from /usr/local/Homebrew/Library/Homebrew/brew.rb:31:in `
'

解决方法:

在命令行执行

$ xcode-select --install

再次安装
$ brew install php70 --with-debug --with-gmp --with-homebrew-curl --with-homebrew-libressl --with-homebrew-libxml2 --with-homebrew-libxslt --with-imap --with-libmysql --with-mysql

成功解决。

参考链接:

http://stackoverflow.com/questions/39442552/5-boxen-errors-when-running-boxen-our-boxen


文章名称:brew安装php70出现configure:error:Cannotfindlibz错误解决方法
文章地址:http://myzitong.com/article/igihoj.html