hdknr / note

Markdown Texts
http://qiita.com/hidelafoglia
7 stars 1 forks source link

brew: php: Error: Formulae found in multiple taps: #8

Open hdknr opened 8 years ago

hdknr commented 8 years ago
$ brew install homebrew/php/php54
==> Installing php54 from homebrew/php
Error: Formulae found in multiple taps: 
 * homebrew/php/php53
 * josegonzalez/php/php53

Please use the fully-qualified name e.g. homebrew/php/php53 to refer the formula.
hdknr commented 8 years ago
$ brew untap josegonzalez/php
Untapping josegonzalez/php... (884 files, 5.9M)
Untapped 564 formulae
hdknr commented 8 years ago
$ brew install homebrew/php/php54
==> Installing php54 from homebrew/php
==> Installing dependencies for homebrew/php/php54: icu4c
==> Installing homebrew/php/php54 dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-56.1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring icu4c-56.1.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X provides libicucore.dylib (but nothing else).

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/icu4c/lib
    CPPFLAGS: -I/usr/local/opt/icu4c/include

==> Summary
🍺  /usr/local/Cellar/icu4c/56.1: 244 files, 63.7M
==> Installing homebrew/php/php54
==> Downloading https://homebrew.bintray.com/bottles-php/php54-5.4.45_3.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring php54-5.4.45_3.yosemite.bottle.tar.gz
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php5_module    /usr/local/opt/php54/libexec/apache2/libphp5.so

The php.ini file can be found in:
    /usr/local/etc/php/5.4/php.ini

✩✩✩✩ Extensions ✩✩✩✩

If you are having issues with custom extension compiling, ensure that
you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

      PATH="/usr/local/bin:$PATH"

PHP54 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.

✩✩✩✩ PHP CLI ✩✩✩✩

If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,
~/.zshrc, ~/.profile or your shell's equivalent configuration file:

      export PATH="$(brew --prefix homebrew/php/php54)/bin:$PATH"

✩✩✩✩ FPM ✩✩✩✩

To launch php-fpm on startup:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/opt/php54/homebrew.mxcl.php54.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php54.plist

The control script is located at /usr/local/opt/php54/sbin/php54-fpm

OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:

  PATH="/usr/local/sbin:$PATH"

You may also need to edit the plist to use the correct "UserName".

Please note that the plist was called 'homebrew-php.josegonzalez.php54.plist' in old versions
of this formula.

To have launchd start homebrew/php/php54 at login:
  ln -sfv /usr/local/opt/php54/*.plist ~/Library/LaunchAgents
Then to load homebrew/php/php54 now:
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php54.plist

WARNING: launchctl will fail when run under tmux.
==> Summary
🍺  /usr/local/Cellar/php54/5.4.45_3: 323 files, 45.2M
hdknr commented 8 years ago
$ which php
/usr/local/bin/php

$ php -v
PHP 5.4.45 (cli) (built: Sep 21 2015 18:55:23) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies