brew install php56 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql --without-snmp
執行這個以後
==> Installing php56 from homebrew/php==> Downloading https://php.net/get/php-5.6.22.tar.bz2/from/this/mirrorAlready downloaded: /Users/miaoyunpeng/Library/Caches/Homebrew/php56-5.6.22==> ./configure --prefix=/usr/local/Cellar/php56/5.6.22 --localstatedir=/usr/local/var --sysconfdir=/usr/locaLast 15 lines from /Users/miaoyunpeng/Library/Logs/Homebrew/php56/01.configure:checking size of int... (cached) 4checking size of short... (cached) 2checking size of long... (cached) 8checking for an ANSI C-conforming const... yeschecking whether time.h and sys/time.h may both be included... yeschecking for working alloca.h... (cached) yeschecking for alloca... (cached) yeschecking for working memcmp... yeschecking for stdarg.h... (cached) yeschecking for mcrypt support... nochecking for MSSQL support via FreeTDS... nochecking for MySQL support... yeschecking for specified location of the MySQL UNIX socket... /tmp/mysql.sockconfigure: error: Cannot find MySQL header files under /usr/local.Note that the MySQL client library is not bundled anymore!READ THIS: https://git.io/brew-troubleshootingIf reporting this issue please do so at (not Homebrew/brew): https://github.com/Homebrew/homebrew-php/issuesThese open issues may also help:Update php56-apcu.rb https://github.com/Homebrew/homebrew-php/pull/3242brew install php56 https://github.com/Homebrew/homebrew-php/issues/2760Runtime error after installing php56-http https://github.com/Homebrew/homebrew-php/issues/3243Make error php56 https://github.com/Homebrew/homebrew-php/issues/1842PHP56 required for composer https://github.com/Homebrew/homebrew-php/issues/2796failed to install php56-pthreads https://github.com/Homebrew/homebrew-php/issues/2768Can't install php56-mcrypt https://github.com/Homebrew/homebrew-php/issues/2452Every update of php56 force me to reinstall php56-intl and php56-mcrypt with --build-from-source https://github.com/Homebrew/homebrew-php/issues/2440Failed to install/reinstall php56-http https://github.com/Homebrew/homebrew-php/issues/2711Fails to Install Php56 with Imap Extensiton https://github.com/Homebrew/homebrew-php/issues/2703I can't find php56_pdo! https://github.com/Homebrew/homebrew-php/issues/2706"brew upgrade" fails: php56 conflicting with php70 when upgrading phpmyadmin https://github.com/Homebrew/homebrew-php/issues/2945Adds a new php70-gearman formula that updates php56-gearman https://github.com/Homebrew/homebrew-php/pull/3120Why does wp-cli formula try to install php56 if php70 is already there? https://github.com/Homebrew/homebrew-php/issues/3179PHP56 can't launch as root, with nginx 500 Internal Server Error? https://github.com/Homebrew/homebrew-php/issues/2709
好多包下載不下來 已經好多次了。哪位大神知道這個是為啥嘛
回複內容:
brew install php56 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql --without-snmp
執行這個以後
==> Installing php56 from homebrew/php==> Downloading https://php.net/get/php-5.6.22.tar.bz2/from/this/mirrorAlready downloaded: /Users/miaoyunpeng/Library/Caches/Homebrew/php56-5.6.22==> ./configure --prefix=/usr/local/Cellar/php56/5.6.22 --localstatedir=/usr/local/var --sysconfdir=/usr/locaLast 15 lines from /Users/miaoyunpeng/Library/Logs/Homebrew/php56/01.configure:checking size of int... (cached) 4checking size of short... (cached) 2checking size of long... (cached) 8checking for an ANSI C-conforming const... yeschecking whether time.h and sys/time.h may both be included... yeschecking for working alloca.h... (cached) yeschecking for alloca... (cached) yeschecking for working memcmp... yeschecking for stdarg.h... (cached) yeschecking for mcrypt support... nochecking for MSSQL support via FreeTDS... nochecking for MySQL support... yeschecking for specified location of the MySQL UNIX socket... /tmp/mysql.sockconfigure: error: Cannot find MySQL header files under /usr/local.Note that the MySQL client library is not bundled anymore!READ THIS: https://git.io/brew-troubleshootingIf reporting this issue please do so at (not Homebrew/brew): https://github.com/Homebrew/homebrew-php/issuesThese open issues may also help:Update php56-apcu.rb https://github.com/Homebrew/homebrew-php/pull/3242brew install php56 https://github.com/Homebrew/homebrew-php/issues/2760Runtime error after installing php56-http https://github.com/Homebrew/homebrew-php/issues/3243Make error php56 https://github.com/Homebrew/homebrew-php/issues/1842PHP56 required for composer https://github.com/Homebrew/homebrew-php/issues/2796failed to install php56-pthreads https://github.com/Homebrew/homebrew-php/issues/2768Can't install php56-mcrypt https://github.com/Homebrew/homebrew-php/issues/2452Every update of php56 force me to reinstall php56-intl and php56-mcrypt with --build-from-source https://github.com/Homebrew/homebrew-php/issues/2440Failed to install/reinstall php56-http https://github.com/Homebrew/homebrew-php/issues/2711Fails to Install Php56 with Imap Extensiton https://github.com/Homebrew/homebrew-php/issues/2703I can't find php56_pdo! https://github.com/Homebrew/homebrew-php/issues/2706"brew upgrade" fails: php56 conflicting with php70 when upgrading phpmyadmin https://github.com/Homebrew/homebrew-php/issues/2945Adds a new php70-gearman formula that updates php56-gearman https://github.com/Homebrew/homebrew-php/pull/3120Why does wp-cli formula try to install php56 if php70 is already there? https://github.com/Homebrew/homebrew-php/issues/3179PHP56 can't launch as root, with nginx 500 Internal Server Error? https://github.com/Homebrew/homebrew-php/issues/2709
好多包下載不下來 已經好多次了。哪位大神知道這個是為啥嘛
Mac Pro 就內建了php5.5環境
不過實在想安裝建議先卸載內建的。
至於homebrew安裝,可以翻牆下載,或者修改host檔案(sudo vi /etc/host);host 檔案可以百度搜尋一下,有一個叫laod網站一直在維護更新
帶上--with-mysql但沒安裝mysql造成的
configure: error: Cannot find MySQL header files under /usr/local.Note that the MySQL client library is not bundled anymore!
解決方案就是先裝上mysql