首页 > mac 用brew 安装php7.0 报错 求解

mac 用brew 安装php7.0 报错 求解

用mac 的brew 安装多个版本的PHP 版本的,安装php53 php56 都是正常的情况,php7.0安装就报错

 brew install php70
==> Installing php70 from josegonzalez/php
Error: Cannot install josegonzalez/php/php70 because conflicting formulae are installed.

  php55: because different php versions install the same binaries.

Please `brew unlink php55` before continuing.

Unlinking removes a formula's symlinks from /usr/local. You can
link the formula again after the install finishes. You can --force this
install, but the build may fail or cause obscure side-effects in the
resulting software.
➜  ~  brew install josegonzalez/php70
Error: No available formula with the name "josegonzalez/php70"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
➜  ~  brew list
freetype    icu4c        libevent    libxml2        php-version    php55        unixodbc
gettext        jpeg        libpng        openssl        php53        readline

报错信息不太明白什么意思


正确的姿势是:

brew unlink php55
brew install php70

错误详细说明:

brew install php70
==> Installing php70 from josegonzalez/php

// 不能安装josegonzalez/php/php70, 因为冲突的软件包已安装
Error: Cannot install josegonzalez/php/php70 because conflicting formulae are installed.

// 冲突软件包php55: 因为不同的php版本安装相同的文件
php55: because different php versions install the same binaries.

// 请在继续之前运行`brew unlink php55`
Please `brew unlink php55` before continuing.

// unlink操作从 /usr/local 去处软件包的软连接. 你可以重新link这个软件包在你需要的软件包安装之后. 你也可以 --force 强制安装, 但是安装可能失败活着引发未知的错误

Unlinking removes a formula's symlinks from /usr/local. You can
link the formula again after the install finishes. You can --force this
install, but the build may fail or cause obscure side-effects in the
resulting software.

➜  ~  brew install josegonzalez/php70

// 错误: 没有可用的名字叫 josegonzalez/php70 的软件包
Error: No available formula with the name "josegonzalez/php70"

// 搜索相似名字的软件包
==> Searching for similarly named formulae...

// 错误: 找不到相似名字的软件包
Error: No similarly named formulae found.

// 搜索包仓库
==> Searching taps...

// 错误: 包仓库中找不到软件包
Error: No formulae found in taps.

➜  ~  brew list
freetype    icu4c        libevent    libxml2        php-version    php55        unixodbc
gettext        jpeg        libpng        openssl        php53        readline

错误信息不实说的很清楚吗。
直接执行brew install josegonzalez/php70


它不是让你运行brew unlink php55吗?那你就运行呗。

【热门文章】
【热门文章】