2016-08-09 2 views
2

현재 내 시스템에 PHP 5.6.23이 설치되어 있습니다. 그러나 내 시스템 (macOS Sierra Beta)에 PHP7을 설치하려고하는데, brew install homebrew/php/php70 . 어떤지도/도움이 많이 주시면 감사하겠습니다macOS에서 PHP7 시에라 베타 설치가 실패

$ brew doctor 
Please note that these warnings are just used to help the Homebrew maintainers 
with debugging if you file an issue. If everything you use Homebrew for is 
working fine: please don't worry and just ignore them. Thanks! 

Warning: You are using OS X 10.12. 
We do not provide support for this pre-release version. 
You may encounter build failures or other breakages. 
Please create pull-requests instead of filing issues. 

:

$ brew install php70 
Warning: You are using OS X 10.12. 
We do not provide support for this pre-release version. 
You may encounter build failures or other breakages. 
Please create pull-requests instead of filing issues. 
==> Installing php70 from homebrew/php 
==> Downloading https://php.net/get/php-7.0.9.tar.bz2/from/this/mirror 
Already downloaded: /Users/Removed/Library/Caches/Homebrew/php70-7.0.9 
==> ./configure --prefix=/usr/local/Cellar/php70/7.0.9 --localstatedir=/usr/local/var --sy 
Last 15 lines from /Users/Removed/Library/Logs/Homebrew/php70/01.configure: 
checking for pthreads_lib... 

Configuring SAPI modules 
checking for Apache 2.0 handler-module support via DSO through APXS... 

Sorry, I cannot run apxs. Possible reasons follow: 

1. Perl is not installed 
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 
3. Apache was not built using --enable-so (the apxs usage page is displayed) 

The output of /usr/sbin/apxs follows: 
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config not found!. 

configure: error: Aborting 

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: 
php70-yaf https://github.com/Homebrew/homebrew-php/issues/3328 
Install PHP70: Incompatible library version https://github.com/Homebrew/homebrew-php/issues/3444 
No solr available for php70 yet https://github.com/Homebrew/homebrew-php/issues/3454 
brew install php70-redis https://github.com/Homebrew/homebrew-php/issues/2762 
php70-imagick has warnings https://github.com/Homebrew/homebrew-php/issues/2766 
Add head formula for php70-uploadprogress https://github.com/Homebrew/homebrew-php/pull/3178 
"brew upgrade" fails: php56 conflicting with php70 when upgrading phpmyadmin https://github.com/Homebrew/homebrew-php/issues/2945 
10.6.8 "brew install php70" failed with Error 139 https://github.com/Homebrew/homebrew-php/issues/2708 
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 
Warning: You are using OS X 10.12. 
We do not provide support for this pre-release version. 
You may encounter build failures or other breakages. 
Please create pull-requests instead of filing issues. 

brew doctor의 결과가 이것이다 :

그러나, 나는 다음과 같은 오류가 발생합니다!

+1

당신이 맥 OS 버전을 preleased 사전에 양조를 사용하려는 경우, 당신은 시간을 가지고 자신의 문제를 읽어야합니다 : [apxs를 : 오류 : /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10. 12.xctoolchain/usr/local/bin/apr-1-config를 찾을 수 없습니다! # 3283] (https://github.com/Homebrew/homebrew-php/issues/3283) –

답변

3

이 시도 : 터미널에서

$ brew link apr-util --force 
$ brew link apr --force 
$ which apu-1-config 
/usr/local/bin/apu-1-config 
$ which apr-1-config 
/usr/local/bin/apr-1-config 
$ sudo mkdir -p /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/ 
$ sudo ln -s /usr/local/bin/apu-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/ 
$ sudo ln -s /usr/local/bin/apr-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/ 
+0

누구나 woodoo 마법을 시도 했습니까? –

+0

Xcode가 설치되어 있으면 작동하는 것 같습니다. 그렇지 않으면 php-fpm (아파치 제외)을 사용하십시오 : 'brew update && brew install apr apr-util && brew 다시 설치 php70 --without-apache --with-fpm' – robrecord

+0

약간 마법에 대한 설명은 훌륭 할 것입니다. apu/apr도 PHP에서 필요하지 않습니다? – andig

0
$ brew tap homebrew/dupes 

$ brew tap homebrew/versions 

$ brew tap homebrew/homebrew-php 

$ brew update && brew install apr apr-util 

$ brew link apr-util --force 
$ brew link apr --force 

$ which apu-1-config 

$ which apr-1-config 

$ sudo mkdir -p /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/ 

$ sudo ln -s /usr/local/bin/apu-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/ 

$ sudo ln -s /usr/local/bin/apr-1-config /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/ 

$ brew install php70 
0

,

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0 

를 맥 OS 시에라에 php7를 설치합니다, 그냥 테스트.

httpd.conf (/ etc/apache2 /에 있음) 파일을 편집하십시오.

아래 줄의 설명.

#LoadModule php5_module libexec/apache2/libphp5.so