当前位置:网站首页>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"边栏推荐
- Execution order of select, from, join, on where groupby, etc. in MySQL
- 58. 最后一个单词的长度
- 【Kaggle比赛常用trick】K折交叉验证、TTA
- ES6 Set与Map是什么,如何使用
- dolphinscheduler simple task definition and complex cross-node parameter transfer
- CMake library search function does not search LD_LIBRARY_PATH
- Scala基础:数组(Array)、映射(Map)、元组(Tuple)、集合(List)
- grep时排除指定的文件和目录
- CMake库搜索函数居然不搜索LD_LIBRARY_PATH
- 维护数千规模MySQL实例,数据库灾备体系构建指南
猜你喜欢
随机推荐
CMake库搜索函数居然不搜索LD_LIBRARY_PATH
Lake storehouse which electricity (2) of the project: project using technology and version and the environment
Xms Xmx PermSize MaxPermSize 区别
There is no one of the strongest kings in the surveillance world!
How to solve the problem that the page does not display the channel configuration after the EasyNVR is updated to (V5.3.0)?
CV-Model【2】:MobileNet v1
无人艇轨迹跟踪的预设性能抗扰控制研究
[PostgreSQL] - explain SQL分析介绍
来n遍剑指--04. 二维数组中的查找
电流电压采集模块DAM-6160
Beijing, Shanghai and Guangzhou offline events丨The most unmissable technology gatherings at the end of the year are all gathered
R语言筛选时间序列数据的子集(subset time series data)、使用window函数筛选连续日期时间范围内的数据(start参数和end参数分别指定起始和结束时间)
DeFi 巨头进军 NFT 领域 用户怎么看?
Scala基础:数组(Array)、映射(Map)、元组(Tuple)、集合(List)
JS事件参数对象event
666666
MySQL【多表查询】
no matching host key type found. Their offer: ssh-rsa
dolphinscheduler adds hana support
13-GuliMall Basics Summary









