当前位置:网站首页>Mac Brew 安装PHP
Mac Brew 安装PHP
2022-07-30 12:50:00 【-阿布-】
1. 默认镜像源安装太慢或发生包not found,第一步切换镜像源为阿里云
其他更多的源参考:Mac 下 brew 切换为国内源 - 腾讯云开发者社区-腾讯云
注意:使用了国内的源之后注意命令行的外网vpn代理就不要开启了,防止卡住
# 查看 brew.git 当前源
$ cd "$(brew --repo)" && git remote -v
origin https://github.com/Homebrew/brew.git (fetch)
origin https://github.com/Homebrew/brew.git (push)
# 查看 homebrew-core.git 当前源
$ cd "$(brew --repo homebrew/core)" && git remote -v
origin https://github.com/Homebrew/homebrew-core.git (fetch)
origin https://github.com/Homebrew/homebrew-core.git (push)
# 修改 brew.git 为阿里源
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 修改 homebrew-core.git 为阿里源
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# zsh 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc
# bash 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile
# 刷新源
$ brew update2. 安装php
参考:macOS 使用 Homebrew 安装 PHP7.4 并替代系统自带 PHP 教程 - 知乎
# 搜索php
brew search php
# 安装php7.4
brew install [email protected]
# 在PATH中追加php
export PATH="/usr/local/opt/[email protected]/bin:$PATH"边栏推荐
- 【Kaggle比赛常用trick】K折交叉验证、TTA
- R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化分组箱图、使用ggpar函数改变图形化参数(ylim、修改可视化图像y轴坐标轴数值范围)
- Parallelized Quick Sort Ideas
- [ASP.NET Core] Dependency Injection for Option Classes
- 腾讯称电竞人才缺口200万;华为鸿蒙3.0正式发布;乐视推行每周工作4天半?...丨黑马头条...
- DeFi 巨头进军 NFT 领域 用户怎么看?
- 干货分享:小技巧大用处之Bean管理类工厂多种实现方式
- 电流电压采集模块DAM-6160
- 物理服务器与虚拟机:主要区别和相似之处
- 维护数千规模MySQL实例,数据库灾备体系构建指南
猜你喜欢

大手笔!两所“双一流”大学,获75亿元重点支持!

What are the hard-core upgrades and applications that cannot be missed in Greenplum 6.0?

漫谈金丝雀部署(Canary Deployment)

PyQt5快速开发与实战 8.6 设置样式

Yilian: Activating the Value Potential of Data Elements and Unleashing the Innovation Dividend of SAS SSD

什么是驱动程序签名,驱动程序如何获取数字签名?

物理服务器与虚拟机:主要区别和相似之处

for循环的3个表达式执行顺序

Using Baidu EasyDL to realize the recognition of the chef's hat of the bright kitchen

New:WebKitX ActiveX :::Crack
随机推荐
DeFi 巨头进军 NFT 领域 用户怎么看?
一文读懂Elephant Swap,为何为ePLATO带来如此高的溢价?
来n遍剑指--04. 二维数组中的查找
电流电压采集模块DAM-6160
R语言时间序列数据算术运算:使用log函数将时间序列数据的数值对数化(平方、开平方、指数化等函数类似使用)
【记一个kaggle划水比赛】PetFinder.my - Pawpularity Contest 宠物预测
[PostgreSQL] - Storage structure and cache shared_buffers
matlab画图,仅显示部分图例
力扣——11.盛最多水的容器
初级永磁直线电机双动子电流镜像容错控制
13-GuliMall 基础篇总结
机器学习——特征选择
[ASP.NET Core] Dependency Injection for Option Classes
CMake library search function does not search LD_LIBRARY_PATH
dolphinscheduler单机化改造
R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化箱图、width参数自定义箱图中箱体的宽度
There is no one of the strongest kings in the surveillance world!
Apache Log4j2漏洞
并行化快速排序设想
CMake库搜索函数居然不搜索LD_LIBRARY_PATH