当前位置:网站首页>mac下安装多个版本php并且进行管理
mac下安装多个版本php并且进行管理
2022-06-28 05:54:00 【death撒旦】
mac多版本php管理
需要的工具
- brew-php-switcher
安装php
安装php8.1
brew install shivammathur/php/[email protected]
安装php7.4
brew install shivammathur/php/[email protected]
安装brew-php-switcher
brew install brew-php-switcher
命令行多版本切换
brew-php-switcher 7.4 #切换到7.4
brew-php-switcher 8.0 #切换到8.1
我也不太清楚为什么 brew-php-switcher只提供了 到8.0版本的切换
但实际上我这里切换时,指定8.0会切换到8.1,可能是因为我本地并没有8.0的代码
安装扩展
切换完版本后就可以直接以 pecl命令安装扩展了,比如我要php8.1安装swoole
brew-php-switcher 8.1 #切换到8.1
#注意直接新开一个shell窗口,因为切换完成后当前活动窗口的php版本还没有改变
pecl install -D 'enable-sockets="no" enable-openssl="yes --with-openssl-dir=/usr/local/opt/openssl" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes"' swoole
等待命令安装成功后php -m | grep

ok
边栏推荐
- Maskrcnn,fast rcnn, faster rcnn优秀视频
- RL 实践(0)—— 及第平台辛丑年冬赛季【Rule-based policy】
- Install fmpefg
- 1404. 将二进制表示减到1的步骤数
- YYGH-BUG-03
- numpy. reshape, numpy. Understanding of transfer
- Openharmony gnawing paper growth plan -- json-rpc
- Jenkins continues integration 2
- 马赛克数据增强 mosaic
- Shanghai Yuge ASR CAT1 4G module 2-way low power 4G application
猜你喜欢
随机推荐
密码学笔记
Qtcanpool knowledge 07:ribbon
Oracle 条件、循环语句
Yygh-8-appointment registration
ipvs 导致syn 重传问题
V4L2 驱动层分析
Interpretation of cloud native microservice technology trend
Jenkins continuous integration 1
The windows environment redis uses AOF persistence and cannot generate an AOF file. After generation, the content of the AOF file cannot be loaded
What is the e-commerce conversion rate so abstract?
Common basic functions of Oracle
Cryptography notes
Xcode13.3.1 项目执行pod install后报错
PS effect understanding record 2 color_ dodge color_ burn
The length of pytorch dataloader the difference between epoch and iteration
马赛克数据增强 mosaic
Jenkins continues integration 2
ERP软件公司选型的重要根据
RL 实践(0)—— 及第平台辛丑年冬赛季【Rule-based policy】
Data middle office: construction ideas and implementation experience of data governance







