mac home-brew 安裝 php 失敗

來源:互聯網
上載者:User
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

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.