当前位置:网站首页>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
边栏推荐
猜你喜欢

Binder面试之:内存管理单元

一看就会 MotionLayout使用的几种方式

数据中台:六问数据中台

Codeworks 5 questions per day (1700 for each)

RL 实践(0)—— 及第平台辛丑年冬赛季【Rule-based policy】

Oracle fundamentals summary

Mysql-16-subquery

Windows环境Redis使用AOF持久化,无法生成AOF文件,生成后无法加载AOF文件内容

6. 毕业设计温湿度监控系统(ESP8266 + DHT11 +OLED 实时上传温湿度数据给公网服务器并在OLED显示屏上显示实时温湿度)

6. graduation design temperature and humidity monitoring system (esp8266 + DHT11 +oled real-time upload temperature and humidity data to the public network server and display the real-time temperature
随机推荐
Office is being updated and the application cannot start normally
Jenkins continuous integration 1
【无标题】
bash install. SH ******** error
Jenkins继续集成2
[untitled]
YYGH-8-预约挂号
Apple MDM Bypass 免越狱绕过MDM配置锁 免费
ES9023音频解码芯片的工作原理
数据中台:数据治理的建设思路以及落地经验
Filecoin hacker song developer competition
How popular are FB and WhatsApp mass messages in 2022?
Common basic functions of Oracle
安装 Ffmpefg
Jenkins持续集成1
Introduction to uicollectionviewdiffabledatasource and nsdiffabledatasourcesnapshot
[C language practice - printing hollow square and its deformation]
What is webrtc?
简单手写debounce函数
2022年全国职业院校技能大赛“网络安全”竞赛试题官方答案