osx - Mac os x 下使用homebrew安装PHP56失败
程序员文章站
2022-05-28 09:17:40
...
➜ ~ git:(master) ✗ brew install php56
==> Installing php56 from homebrew/homebrew-php
==> Downloading https://www.php.net/get/php-5.6.4.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php56-5.6.4
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php56/5.6.4 --localstatedir=/usr/loca
==> make
/private/tmp/php56-uHXcTe/php-5.6.4/sapi/apache2handler/sapi_apache2.c:41:10: fatal error: 'ap_config.h' file not found#include "ap_config.h"
^
1 error generated.
make: *** [sapi/apache2handler/sapi_apache2.lo] Error 1
READ THIS: http://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-php/issues
然后上 https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting 查阅了资料,无法解决问题
**➜ ~ git:(master) ✗ brew doctor
Your system is ready to brew.**
通过运行brew doctor自检,homebrew没发现问题
➜ ~ git:(master) ✗ brew gist-logs
usage: brew gist-logs [--new-issue|-n]
➜ ~ git:(master) ✗ brew gist-logs https://github.com/Homebrew/homebrew-apache.git
然后怀疑是 apache 出现问题,直接通过 `homebrew-apache 尝试下载,无效
######################################################################## 100.0%
Error: /Library/Caches/Homebrew/Formula/homebrew-apache.git:5: syntax error, unexpected '
^
/Library/Caches/Homebrew/Formula/homebrew-apache.git:6: syntax error, unexpected '
^
/Library/Caches/Homebrew/Formula/homebrew-apache.git:6: syntax error, unexpected keyword_class, expecting end-of-input
^
Please report this bug:
http://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:92:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:151:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:71:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:200:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/gist-logs.rb:127:in `gist_logs'
/usr/local/Library/brew.rb:135:in `'
➜ ~ git:(master) ✗
➜ ~ git:(master) ✗ sudo apachectl -v
Password:
Server version: Apache/2.4.9 (Unix)
Server built: Sep 9 2014 14:48:20
➜ ~ git:(master) ✗
查询了Apache,看起来没问题啊实在不知道问题出现在哪里了
参考资料
参考资料2error freetype.h not found installing php53 #885
回复内容:
➜ ~ git:(master) ✗ brew install php56
==> Installing php56 from homebrew/homebrew-php
==> Downloading https://www.php.net/get/php-5.6.4.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php56-5.6.4
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php56/5.6.4 --localstatedir=/usr/loca
==> make
/private/tmp/php56-uHXcTe/php-5.6.4/sapi/apache2handler/sapi_apache2.c:41:10: fatal error: 'ap_config.h' file not found#include "ap_config.h"
^
1 error generated.
make: *** [sapi/apache2handler/sapi_apache2.lo] Error 1
READ THIS: http://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-php/issues
然后上 https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting 查阅了资料,无法解决问题
**➜ ~ git:(master) ✗ brew doctor
Your system is ready to brew.**
通过运行brew doctor自检,homebrew没发现问题
➜ ~ git:(master) ✗ brew gist-logs
usage: brew gist-logs [--new-issue|-n]
➜ ~ git:(master) ✗ brew gist-logs https://github.com/Homebrew/homebrew-apache.git
然后怀疑是 apache 出现问题,直接通过 `homebrew-apache 尝试下载,无效
######################################################################## 100.0%
Error: /Library/Caches/Homebrew/Formula/homebrew-apache.git:5: syntax error, unexpected '
^
/Library/Caches/Homebrew/Formula/homebrew-apache.git:6: syntax error, unexpected '
^
/Library/Caches/Homebrew/Formula/homebrew-apache.git:6: syntax error, unexpected keyword_class, expecting end-of-input
^
Please report this bug:
http://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:92:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:151:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:71:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:200:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/gist-logs.rb:127:in `gist_logs'
/usr/local/Library/brew.rb:135:in `'
➜ ~ git:(master) ✗
➜ ~ git:(master) ✗ sudo apachectl -v
Password:
Server version: Apache/2.4.9 (Unix)
Server built: Sep 9 2014 14:48:20
➜ ~ git:(master) ✗
查询了Apache,看起来没问题啊实在不知道问题出现在哪里了
参考资料
参考资料2error freetype.h not found installing php53 #885
推荐PHPBrew
还是采用homebrew下的命令