mac home-brew 安装 php 失败

WBOY
풀어 주다: 2016-07-06 13:53:56
원래의
1956명이 탐색했습니다.

<code>brew install php56 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql --without-snmp
</code>
로그인 후 복사
로그인 후 복사

执行这个以后

<code>==> Installing php56 from homebrew/php
==> Downloading https://php.net/get/php-5.6.22.tar.bz2/from/this/mirror
Already 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/loca
Last 15 lines from /Users/miaoyunpeng/Library/Logs/Homebrew/php56/01.configure:
checking size of int... (cached) 4
checking size of short... (cached) 2
checking size of long... (cached) 8
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for working memcmp... yes
checking for stdarg.h... (cached) yes
checking for mcrypt support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... /tmp/mysql.sock
configure: 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-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-php/issues

These open issues may also help:
Update php56-apcu.rb https://github.com/Homebrew/homebrew-php/pull/3242
brew install php56 https://github.com/Homebrew/homebrew-php/issues/2760
Runtime error after installing php56-http https://github.com/Homebrew/homebrew-php/issues/3243
Make error php56 https://github.com/Homebrew/homebrew-php/issues/1842
PHP56 required for composer https://github.com/Homebrew/homebrew-php/issues/2796
failed to install php56-pthreads https://github.com/Homebrew/homebrew-php/issues/2768
Can't install php56-mcrypt https://github.com/Homebrew/homebrew-php/issues/2452
Every update of php56 force me to reinstall php56-intl and php56-mcrypt with --build-from-source https://github.com/Homebrew/homebrew-php/issues/2440
Failed to install/reinstall php56-http https://github.com/Homebrew/homebrew-php/issues/2711
Fails to Install Php56 with Imap Extensiton https://github.com/Homebrew/homebrew-php/issues/2703
I 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/2945
Adds a new php70-gearman formula that updates php56-gearman https://github.com/Homebrew/homebrew-php/pull/3120
Why does wp-cli formula try to install php56 if php70 is already there? https://github.com/Homebrew/homebrew-php/issues/3179
PHP56 can't launch as root, with nginx 500 Internal Server Error? https://github.com/Homebrew/homebrew-php/issues/2709
</code>
로그인 후 복사
로그인 후 복사

好多包下载不下来 已经好多次了。哪位大神知道这个是为啥嘛

回复内容:

<code>brew install php56 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql --without-snmp
</code>
로그인 후 복사
로그인 후 복사

执行这个以后

<code>==> Installing php56 from homebrew/php
==> Downloading https://php.net/get/php-5.6.22.tar.bz2/from/this/mirror
Already 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/loca
Last 15 lines from /Users/miaoyunpeng/Library/Logs/Homebrew/php56/01.configure:
checking size of int... (cached) 4
checking size of short... (cached) 2
checking size of long... (cached) 8
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for working memcmp... yes
checking for stdarg.h... (cached) yes
checking for mcrypt support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... /tmp/mysql.sock
configure: 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-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-php/issues

These open issues may also help:
Update php56-apcu.rb https://github.com/Homebrew/homebrew-php/pull/3242
brew install php56 https://github.com/Homebrew/homebrew-php/issues/2760
Runtime error after installing php56-http https://github.com/Homebrew/homebrew-php/issues/3243
Make error php56 https://github.com/Homebrew/homebrew-php/issues/1842
PHP56 required for composer https://github.com/Homebrew/homebrew-php/issues/2796
failed to install php56-pthreads https://github.com/Homebrew/homebrew-php/issues/2768
Can't install php56-mcrypt https://github.com/Homebrew/homebrew-php/issues/2452
Every update of php56 force me to reinstall php56-intl and php56-mcrypt with --build-from-source https://github.com/Homebrew/homebrew-php/issues/2440
Failed to install/reinstall php56-http https://github.com/Homebrew/homebrew-php/issues/2711
Fails to Install Php56 with Imap Extensiton https://github.com/Homebrew/homebrew-php/issues/2703
I 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/2945
Adds a new php70-gearman formula that updates php56-gearman https://github.com/Homebrew/homebrew-php/pull/3120
Why does wp-cli formula try to install php56 if php70 is already there? https://github.com/Homebrew/homebrew-php/issues/3179
PHP56 can't launch as root, with nginx 500 Internal Server Error? https://github.com/Homebrew/homebrew-php/issues/2709
</code>
로그인 후 복사
로그인 후 복사

好多包下载不下来 已经好多次了。哪位大神知道这个是为啥嘛

Mac Pro 就自带了php5.5环境
不过实在想安装建议先卸载自带的。
至于homebrew安装,可以翻墙下载,或者修改host文件(sudo vi /etc/host);host 文件可以百度搜索一下,有一个叫laod网站一直在维护更新

带上--with-mysql但没安装mysql造成的

<code>configure: error: Cannot find MySQL header files under /usr/local.
Note that the MySQL client library is not bundled anymore!
</code>
로그인 후 복사

解决方法就是先装上mysql

관련 라벨:
php
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿