brew install memcache get Error: Formulae found in multiple taps

本文详细记录了在MacOSX10.11.1环境下为PHP5.5安装memcached扩展的过程。面对安装过程中出现的多个tap源冲突及依赖缺失等问题,通过具体的步骤逐一解决,并成功安装。

本篇文章由:http://xinpure.com/brew-install-memcache-get-error-formulae-found-in-multiple-taps/

安装环境:

Mac OSX 10.11.1

PHP 5.5.19

安装过程及错误信息

Input:

xinpureZhu:php xinpure$ brew install memcache

Output:

Error: No available formula with the name "memcache" 
==> Searching for similarly named formulae...
These similarly named formulae were found:
josegonzalez/php/php53-memcache       josegonzalez/php/php54-memcached      josegonzalez/php/php56-memcache       memcache-top                        
josegonzalez/php/php53-memcached      josegonzalez/php/php55-memcache       josegonzalez/php/php56-memcached      memcached                           
josegonzalez/php/php54-memcache       josegonzalez/php/php55-memcached      libmemcached                          memcacheq                           
To install one of them, run (for example):
  brew install josegonzalez/php/php53-memcache
==> Searching taps...
These formulae were found in taps:
homebrew/php/php53-memcache   homebrew/php/php54-memcache   homebrew/php/php55-memcache   homebrew/php/php56-memcache   homebrew/php/php70-memcached
homebrew/php/php53-memcached  homebrew/php/php54-memcached  homebrew/php/php55-memcached  homebrew/php/php56-memcached
To install one of them, run (for example):
  brew install homebrew/php/php53-memcache

Input:

xinpureZhu:php xinpure$ brew install homebrew/php/php55-memcache

Output:

==> Tapping homebrew/php
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 544, done.
remote: Compressing objects: 100% (502/502), done.
remote: Total 544 (delta 374), reused 66 (delta 41), pack-reused 0
Receiving objects: 100% (544/544), 217.13 KiB | 31.00 KiB/s, done.
Resolving deltas: 100% (374/374), done.
Checking connectivity... done.
Tapped 525 formulae (561 files, 2.6M)
==> Installing php55-memcache from homebrew/homebrew-php
Error: Formulae found in multiple taps: 
 * homebrew/php/php55
 * josegonzalez/php/php55

Please use the fully-qualified name e.g. homebrew/php/php55 to refer the formula.

问题一 multiple taps 解决方法

brew untap josegonzalez/php
brew tap --repair
brew update

Input:

xinpureZhu:scripts xinpure$ brew install php55-memcached

Output:

...省略...

==> Installing homebrew/php/php55-memcached
==> Downloading https://pecl.php.net/get/memcached-2.2.0.tgz
######################################################################## 100.0%
==> /usr/local/opt/php55/bin/phpize
==> ./configure --prefix=/usr/local/Cellar/php55-memcached/2.2.0 --with-php-config=/usr/local/opt/php55/bin/php-config --with-libmemcached-dir=/usr/lo
Last 15 lines from /Users/xinpure/Library/Logs/Homebrew/php55-memcached/02.configure:
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... yes
checking whether to enable memcached json serializer support... no
checking whether to enable memcached msgpack serializer support... no
checking whether to enable memcached sasl support... yes
checking whether to enable memcached protocol support... no
checking for ZLIB... yes, shared
checking for pkg-config... /usr/local/opt/pkg-config/bin/pkg-config
checking for zlib location... configure: error: memcached support requires ZLIB(错误提示在这。。。). Use --with-zlib-dir=<DIR> to specify the prefix where ZLIB headers and library are located

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/homebrew/homebrew-php/issues

问题二 memcached support requires ZLIB 解决方法

xcode-select --install

此命令会弹出安装界面,耐心等待安装完成。

Input:

xinpureZhu:scripts xinpure$ brew install php55-memcached

Output:

==> Installing php55-memcached from homebrew/homebrew-php
==> Downloading https://pecl.php.net/get/memcached-2.2.0.tgz
Already downloaded: /Library/Caches/Homebrew/php55-memcached-2.2.0.tgz
==> /usr/local/opt/php55/bin/phpize
==> ./configure --prefix=/usr/local/Cellar/php55-memcached/2.2.0 --with-php-config=/usr/local/opt/php55/bin/php-config --with-libmemcached-dir=/usr/lo
==> make
==> Caveats
To finish installing memcached for PHP 5.5:
  * /usr/local/etc/php/5.5/conf.d/ext-memcached.ini was created,
    do not forget to remove it upon extension removal.
  * Validate installation via one of the following methods:
  *
  * Using PHP from a webserver:
  * - Restart your webserver.
  * - Write a PHP page that calls "phpinfo();"
  * - Load it in a browser and look for the info on the memcached module.
  * - If you see it, you have been successful!
  *
  * Using PHP from the command line:
  * - Run "php -i" (command-line "phpinfo()")
  * - Look for the info on the memcached module.
  * - If you see it, you have been successful!
==> Summary
  /usr/local/Cellar/php55-memcached/2.2.0: 5 files, 112K, built in 14 seconds

参考链接

问题一参考: http://stackoverflow.com/questions/30864992/how-can-i-fix-error-formulae-found-in-multiple-taps

问题二参考: https://github.com/Homebrew/homebrew-php/issues/2029

https://github.com/Homebrew/homebrew-php/issues/1953

转载于:https://www.cnblogs.com/xinpureZhu/p/4943989.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值