mac brew 安装 php 环境

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px }
span.s1 { }
span.s2 { color: #5230e1 }
span.s3 { color: #34bc26 }
span.s4 { color: #afad24 }


p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
span.s1 { }

548  brew search php

549  brew tap homebrew/dupes

550  brew tap josegonzalez/homebrew-php

551  brew search php

552  brew install php56 --with-imap --with-tidy --with-debug --with-mysql --with-fpm

554  history | grep brew

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$ brew install php56 --with-imap --with-tidy --with-debug --with-mysql --with-fpm

Updating Homebrew...

==> Auto-updated Homebrew!

Updated 1 tap (homebrew/core).

No changes to formulae.

==> Installing php56 from josegonzalez/php

==> Installing dependencies for josegonzalez/php/php56: libpng, freetype, gettext, icu4c, imap-uw, jpeg, libxml2, libtool, unixodbc, readline

==> Installing josegonzalez/php/php56 dependency: libpng

==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.34.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring libpng-1.6.34.sierra.bottle.tar.gz

??  /usr/local/Cellar/libpng/1.6.34: 26 files, 1.2MB

==> Installing josegonzalez/php/php56 dependency: freetype

==> Downloading https://homebrew.bintray.com/bottles/freetype-2.9.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring freetype-2.9.sierra.bottle.tar.gz

??  /usr/local/Cellar/freetype/2.9: 60 files, 2.7MB

==> Installing josegonzalez/php/php56 dependency: gettext

==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring gettext-0.19.8.1.sierra.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local,

because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have this software first in your PATH run:

echo ‘export PATH="/usr/local/opt/gettext/bin:$PATH"‘ >> ~/.bash_profile

For compilers to find this software you may need to set:

LDFLAGS:  -L/usr/local/opt/gettext/lib

CPPFLAGS: -I/usr/local/opt/gettext/include

==> Summary

??  /usr/local/Cellar/gettext/0.19.8.1: 1,934 files, 16.9MB

==> Installing josegonzalez/php/php56 dependency: icu4c

==> Downloading https://homebrew.bintray.com/bottles/icu4c-60.2.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring icu4c-60.2.sierra.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local,

because macOS provides libicucore.dylib (but nothing else).

If you need to have this software first in your PATH run:

echo ‘export PATH="/usr/local/opt/icu4c/bin:$PATH"‘ >> ~/.bash_profile

echo ‘export PATH="/usr/local/opt/icu4c/sbin:$PATH"‘ >> ~/.bash_profile

For compilers to find this software you may need to set:

LDFLAGS:  -L/usr/local/opt/icu4c/lib

CPPFLAGS: -I/usr/local/opt/icu4c/include

==> Summary

??  /usr/local/Cellar/icu4c/60.2: 249 files, 67MB

==> Installing josegonzalez/php/php56 dependency: imap-uw

==> Downloading https://homebrew.bintray.com/bottles/imap-uw-2007f.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring imap-uw-2007f.sierra.bottle.tar.gz

??  /usr/local/Cellar/imap-uw/2007f: 151 files, 9.0MB

==> Installing josegonzalez/php/php56 dependency: jpeg

==> Downloading https://homebrew.bintray.com/bottles/jpeg-9b.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring jpeg-9b.sierra.bottle.tar.gz

??  /usr/local/Cellar/jpeg/9b: 20 files, 724KB

==> Installing josegonzalez/php/php56 dependency: libxml2

==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.7.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring libxml2-2.9.7.sierra.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local,

because macOS already provides this software and installing another version in

parallel can cause all kinds of trouble.

If you need to have this software first in your PATH run:

echo ‘export PATH="/usr/local/opt/libxml2/bin:$PATH"‘ >> ~/.bash_profile

For compilers to find this software you may need to set:

LDFLAGS:  -L/usr/local/opt/libxml2/lib

CPPFLAGS: -I/usr/local/opt/libxml2/include

If you need Python to find bindings for this keg-only formula, run:

echo /usr/local/opt/libxml2/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/libxml2.pth

mkdir -p /Users/xingchong/Library/Python/2.7/lib/python/site-packages

echo ‘import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")‘ >> /Users/xingchong/Library/Python/2.7/lib/python/site-packages/homebrew.pth

==> Summary

??  /usr/local/Cellar/libxml2/2.9.7: 281 files, 10.4MB

==> Installing josegonzalez/php/php56 dependency: libtool

==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring libtool-2.4.6_1.sierra.bottle.tar.gz

==> Caveats

In order to prevent conflicts with Apple‘s own libtool we have prepended a "g"

so, you have instead: glibtool and glibtoolize.

==> Summary

??  /usr/local/Cellar/libtool/2.4.6_1: 70 files, 3.7MB

==> Installing josegonzalez/php/php56 dependency: unixodbc

==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.5_1.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring unixodbc-2.3.5_1.sierra.bottle.tar.gz

??  /usr/local/Cellar/unixodbc/2.3.5_1: 43 files, 1.8MB

==> Installing josegonzalez/php/php56 dependency: readline

==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.3_1.sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring readline-7.0.3_1.sierra.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local,

because macOS provides the BSD libedit library, which shadows libreadline.

In order to prevent conflicts when programs look for libreadline we are

defaulting this GNU Readline installation to keg-only..

For compilers to find this software you may need to set:

LDFLAGS:  -L/usr/local/opt/readline/lib

CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary

??  /usr/local/Cellar/readline/7.0.3_1: 46 files, 1.5MB

Warning: josegonzalez/php/php56: this formula has no --with-fpm option so it will be ignored!

Warning: josegonzalez/php/php56: this formula has no --with-mysql option so it will be ignored!

Warning: josegonzalez/php/php56: this formula has no --with-tidy option so it will be ignored!

==> Installing josegonzalez/php/php56 --with-debug --with-imap

==> Downloading https://php.net/get/php-5.6.33.tar.bz2/from/this/mirror

==> Downloading from https://secure.php.net/get/php-5.6.33.tar.bz2/from/this/mirror

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/php56/5.6.33_9 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.6 --with-config-file-pa

==> make

==> make install

==> Caveats

The php.ini file can be found in:

/usr/local/etc/php/5.6/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"

PHP56 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/php56)/bin:$PATH"

???? FPM ????

To launch php-fpm on startup:

mkdir -p ~/Library/LaunchAgents

cp /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/

launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist

The control script is located at /usr/local/opt/php56/sbin/php56-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.php56.plist‘ in old versions of this formula.

With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system you have to install php with the --with-httpd option. See  brew options php56 for more details.

To have launchd start josegonzalez/php/php56 now and restart at login:

brew services start josegonzalez/php/php56

==> Summary

??  /usr/local/Cellar/php56/5.6.33_9: 331 files, 42.7MB, built in 7 minutes 10 seconds

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$

bogon:etc xingchong$ php -v

PHP 5.6.31 (cli) (built: Jul 10 2017 07:55:18)

Copyright (c) 1997-2016 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

bogon:etc xingchong$

bogon:etc xingchong$

原文地址:https://www.cnblogs.com/xingchong/p/8442926.html

时间: 2024-11-09 06:10:14

mac brew 安装 php 环境的相关文章

Mac brew 安装amp环境

|首先加入Homebrew官方的几个软件源 $ brew tap homebrew/dupes $ brew tap homebrew/versions $ brew tap homebrew/php |安装PHP5.6 $ brew install php56 新问题:安装完成后没有Apache用的php5.so - 卸载: $ brew remove php56 - 安装: $ brew install php56 -with-apache 如果出现以下内容说明被弃用了 Warning: h

Mac brew 安装mysql 报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket

安装mysql 最新版 56 brew install mysql 启动报错 ben:~ soul$ which mysql /usr/local/bin/mysql ben:~ soul$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 解决办法 运行 ben:~ soul$ mysql.server start Starting MySQL .

mac下安装libpng环境

用go写一个爬虫工具时需要使用一个go的库,而这个库有需要使用libpng库,不然编译就会提示说 png.h找不到等之类的信息,于是想到应该和windows一样需要安装gcc环境,然后让gcc里安装libpng这个库, 解决办法: 终端里输入 'gcc -v' 发现mac默认是有gcc环境的,只是没有libpng这个库,于是依照网上的方法,先安装一个叫做brew的环境,直接在终端输入: ruby -e "$(curl -fsSL https://raw.githubusercontent.com

在Mac上安装ruby环境

CocoaPods应该是iOS最常用最有名的类库管理工具了,上述两个烦人的问题,通过cocoaPods,只需要一行命令就可以完全解决,当然前提是你必须正确设置它.重要的是,绝大部分有名的开源类库,都支持CocoaPods.所以,作为iOS程序员的我们,掌握CocoaPods的使用是必不可少的基本技能了. =========第一步  配置ruby环境============= http://www.cnblogs.com/daguo/p/4097263.html 以下代码区域,带有 $ 打头的表示

Mac 下安装Ruby环境

步骤1 - 安装 RVM RVM 是干什么的这里就不解释了,后面你将会慢慢搞明白. $ curl -L https://get.rvm.io | bash -s stable 期间可能会问你sudo管理员密码,这里可能需要等待一段时间后就可以成功安装好 RVM. 案例信息如下: lihuifengdeMacBook-Pro:~ lihuifeng$ curl -L https://get.rvm.io | bash -s stable % Total    % Received % Xferd 

Mac Brew 安装及配置

mac 终端下,执行以下命令,即可安装brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 在终端环境下,brew --version 查看brew的版本,也可以验证brew是否安装成功 安装完毕后,发现使用brew命令,却还是提示:-bash: brew: command not found 其实解决这个问题真的很简单.如下: s

mac brew安装mysql

mac不自带mysql,这里需要重新安装,方法依然很简单 brew install mysql unset TMPDIR mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp sudo chown -R your_user /usr/local/var/mysql/ 第一句是安装,后面的是确保正常

mac 下安装 lua环境

1,安装命令 首先从mac AppStore 上面安装brew. brew只能当前用户使用. $ brew install lua --with-completion ==> Downloading http://www.lua.org/ftp/lua-5.2.3.tar.gz ######################################################################## 100.0% ==> Downloading http://luajit

mac brew安装

mac 安装homebrew出错 Failed to connect to raw.githubusercontent.com port 443: Connection refused error:原创heroacool 发布于2019-10-31 19:45:04 阅读数 5672 收藏展开 折腾了好久,执行 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/inst