php - 在我的 Mac 上使用自制软件安装 php 71 时出错
问题描述
我已经和 Vallet 一起开发了一段时间。今天我想将 laravel 5.4 更新到 5.5。在这样做之前,我运行composer global update
。导致 Vallet 停止工作。
拳头我试图做以下事情:
cd ~/.composer/
sudo chown -R $(whoami) vendor
来源:https ://laracasts.com/discuss/channels/general-discussion/getting-valet-not-found-error
我没有解决问题。然后我决定重新安装 Vallet。特此我做了以下事情:
我跟着这个:https ://github.com/laravel/valet/issues/321
停止和卸载服务
sudo brew services stop php71 dnsmasq nginx
brew uninstall php71 dnsmasq nginx
删除相关配置文件和代客主文件夹
sudo rm -r /usr/local/etc/php /usr/local/etc/nginx /usr/local/etc/dnsmasq.conf
sudo rm -r ~/.valet /var/root/.valet
安装服务我试过这个:
brew install php71
$ brew tap homebrew/php
$ brew install php71
brew install homebrew/php/php71
都给出了以下错误:
MacBook-Pro:~ mblivier$ brew install homebrew/php/php71
==> Installing php71 from homebrew/php Error: The following formula: php71
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:xcode-select --install
我是新手,不知道如何解决这个问题。有什么建议如何安装 php 并进一步重新安装 Vallet?
- 自制软件已安装并正在运行
解决方案
你需要 xcode 来构建 php,所以首先运行:
xcode-select --install
安装xcode,以后你可以brew install php71
推荐阅读
- r - 根据先前确认的向量对表中的列进行重新排序,
- python-3.x - 网络抓取 10000 个 url 以从亚马逊网站获取产品评论和价格,仅输出 NA
- javascript - 如何使用javascript在同一html中的div中显示我已经在我的html中拥有的图像
- c++ - cv 限定符在 void 函数上的行为是什么?
- python - 我不能在 jinja 的 if 语句中使用变量
- javascript - 响应时反应交叉观察器不起作用
- vue.js - 使用 v-for 进行渲染
- javascript - JavaScript 的加法导致奇怪的结果
- python - 全局函数问题
- pine-script - TradingView '行尾没有续行' 错误