当前位置:网站首页>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"边栏推荐
- 【河北工业大学】考研初试复试资料分享
- [BJDCTF2020]Cookie is so stable-1|SSTI注入
- Add the device library after Vivado installation
- 腰部外骨骼机器人线性自抗扰控制器参数优化
- 【Kaggle比赛常用trick】K折交叉验证、TTA
- How to display an Excel table in the body of an email?
- 元宇宙的六大支撑技术
- Anaconda\Scripts\pip-script.py is not present ? 解决方案
- 并行化快速排序设想
- CMake库搜索函数居然不搜索LD_LIBRARY_PATH
猜你喜欢

忆联:激活数据要素价值潜能,释放SAS SSD创新红利

How to display an Excel table in the body of an email?

DeFi 巨头进军 NFT 领域 用户怎么看?

【语音识别】基于GMM-HMM的语音识别系统

13-GuliMall Basics Summary

Decoding Redis' most overlooked high CPU and memory usage issues

js 构造函数 return 非空对象,其实例化的对象在原型上的差异

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

Go 事,Gopher 要学的数字类型,变量,常量,运算符 ,第2篇

MySQL【多表查询】
随机推荐
Add the device library after Vivado installation
These critical programs are missing or too old: ma
JS事件参数对象event
[BJDCTF2020]Cookie is so stable-1|SSTI injection
干货分享:小技巧大用处之Bean管理类工厂多种实现方式
Tutorial on using the one-key upgrade function of the RTSP/Onvif video platform EasyNVR service
What are the hard-core upgrades and applications that cannot be missed in Greenplum 6.0?
R语言ggstatsplot包grouped_ggwithinstats函数可视化分组小提琴图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)
Markdown 3 - 流程图表
Smart pointer implementation conjecture
多表联查的学习
电流电压采集模块DAM-6160
Go 事,Gopher 要学的数字类型,变量,常量,运算符 ,第2篇
Xms Xmx PermSize MaxPermSize 区别
MySQL查询性能优化
Vivado安装后添加器件库
How to migrate the device data connected by RTSP of EasyCVR platform to EasyNVR?
【语音识别】基于GMM-HMM的语音识别系统
RTSP/Onvif协议视频平台EasyNVR服务一键升级功能的使用教程
湖仓一体电商项目(二):项目使用技术及版本和基础环境准备