Subscribed unsubscribe Subscribe Subscribe

hasen's tech life

Twitter: @hasen

Homebrewでxhprofを入れる時に,"Error: Formulae found in multiple taps"というエラーが出たので対応.

PHP Homebrew

# Homebrewでxhprofを入れる時に,"Error: Formulae found in multiple taps"というエラーが出たので対応.
# josegonzalez/phpからhomebrew/phpに切り替えた.
# また,xhprofを入れる時には'--build-from-source'オプションが必要.

# error
$ brew install josegonzalez/php/php56-xhprof
> ==> Installing php56-xhprof from josegonzalez/homebrew-php
> Error: Formulae found in multiple taps:
> * homebrew/php/php56
> * josegonzalez/php/php56

# 参考: How can I fix “Error: Formulae found in multiple taps”?
$ brew untap josegonzalez/homebrew-php
$ brew install php56
$ brew install php56-xhprof
$ php -v
> PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php56/5.6.13_2/lib/php/extensions/no-debug-non-zts-20131226/xhprof.so' - dlopen(/usr/local/Cellar/php56/5.6.13_2/lib/php/extensions/no-debug-non-zts-20131226/xhprof.so, 9): image not found in Unknown on line 0
> PHP 5.6.13 (cli) (built: Sep 17 2015 21:19:48)
> Copyright (c) 1997-2015 The PHP Group
> Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

$ vi /usr/local/etc/php/5.6/php.ini

$ php -v
> Warning: PHP Startup: Unable to load dynamic library '@@HOMEBREW_PREFIX@@/opt/php56-xhprof/xhprof.so' - dlopen(@@HOMEBREW_PREFIX@@/opt/php56-xhprof/xhprof.so, 9): image not found in Unknown on line 0
> PHP 5.6.13 (cli) (built: Sep 17 2015 21:19:48)
> Copyright (c) 1997-2015 The PHP Group
> Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

# 参考: Failed loading /usr/local/opt/php56-xdebug/xdebug.so: dlopen(/usr/local/opt/php56-xdebug/xdebug.so, 9): Symbol not found: _basic_globals #1556
$ brew reinstall php56-xhprof --build-from-source
$ php -v
> PHP 5.6.13 (cli) (built: Sep 17 2015 21:19:48)
> Copyright (c) 1997-2015 The PHP Group
> Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies