macOS Sierra Beta上的PHP7无法安装

I currently have PHP 5.6.23 installed on my system.. However, I am trying to install PHP7 on my system (macOS Sierra Beta), I'm trying to do this with brew install homebrew/php/php70.

However, I get the following error:

$ 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.

The outcome of brew doctor is this:

$ 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.

Any guidance/help would be much appreciated!

dq_609586475
dq_609586475 如果你想使用预先发布的MacOS版本的brew,那么你应该花时间阅读他们的问题:apxs:错误:/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local找不到/bin/apr-1-config!#3283
大约 4 年之前 回复

3个回答



试试这个:</ p>

  $ brew link apr-util --force 
$ brew链接apr --force
$ apu-1-config
/ usr / local / bin / apu-1-config
$ 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/

</ div>

展开原文

原文

Try this:

$ 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/

dougou5852
dougou5852 在从源配置/构建时,此答案解决了相同的错误。
接近 4 年之前 回复
douying4203
douying4203 用魔法做一点解释会很棒。 php甚至不需要apu / apr?
大约 4 年之前 回复
doupu1949
doupu1949 如果安装了Xcode,它应该可行。 如果你不这样做,你使用php-fpm(没有apache)试试这个:brew update && brew install apr apr-util && brew重新安装php70 --without-apache --with-fpm
大约 4 年之前 回复
dqayok7935
dqayok7935 有人试过这个木头魔法吗?
大约 4 年之前 回复



  $ brew tap homebrew / dupes 

$ brew tap homebrew / 版本

$ brew tap homebrew / homebrew-php

$ brew update&amp;&amp; brew安装apr apr-util

$ brew链接apr-util --force
$ brew链接apr --force

$ apu-1-config

$ apr-1-config

$ sudo mkdir -p /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/
nn$ 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/
nn$ brew install php70
</ code> </ pre>
</ div>

展开原文

原文

$ 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



在终端中,</ p>

  curl -s http:// php-osx。  liip.ch/install.sh |  bash -s 7.0 
</ code> </ pre>

将在macOS Sierra上安装php7,我刚刚测试过。</ p>

编辑httpd.conf(位于 / etc / apache2 /)文件。</ p>

评论下面的行。</ p>

  #LoadModule php5_module libexec / apache2 / libphp5.so 
< / code> </ pre>
</ div>

展开原文

原文

In terminal,

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

will install php7 on macOS Sierra, I just tested.

Edit httpd.conf (located in /etc/apache2/) file.

Comment below line.

#LoadModule php5_module libexec/apache2/libphp5.so

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐