当前位置:网站首页>mamp下缺少pcntl扩展的解决办法,Fatal error: Call to undefined function pcntl_signal()
mamp下缺少pcntl扩展的解决办法,Fatal error: Call to undefined function pcntl_signal()
2022-07-04 22:30:00 【宋小羽】
mac下默认使用的是自带的PHP,导致配置mamp的PHP始终无法成功
1. 如何将默认使用的PHP替换成mamp集成环境下的PHP
- 修改bash中的配置
// 打开配置文件
vim .bash_profile
// 添加配置
export PATH="/Applications/MAMP/bin/php/php7.1.20/bin:$PATH"
// 配置文件生效
source .bash_profile
- 修改zsh中的配置
// 打开配置文件
vim .zshrc
// 添加配置
export PATH="/Applications/MAMP/bin/php/php7.1.20/bin:$PATH"
// 配置文件生效 尚有疑问
source .zshrc
2. 添加pcntl扩展
- 下载对应版本的PHP http://www.php.net/releases/
- 解压文件tar -xzvf php-7.1.20.tar.gz
- 进入pcntl目录cd php-7.1.20/ext/pcntl
- 进行phpize变异/Applications/MAMP/bin/php/php7.1.20/bin/phpize
- 执行命令 ./configure
–with-php-config=/Applications/MAMP/bin/php/php7.1.20/bin/php-config --prefix=/Applications/MAMP/bin/php/php7.1.20/bin/php - make编译`make && make install
- 终端显示以下信息,即为成功
Installing shared extensions: /Applications/MAMP/bin/php/php7.1.20/lib/php/extensions/no-debug-non-zts-20170718/
- 打开mamp对应版本php的配置文件添加 extension=pcntl.so
MAMP PRO menu->File ->Edit Template->PHP->7.1.20
- 执行php --ri pcntl 后,终端显示pcntl pcntl support => enabled就大功告成啦。
参考文档
https://www.jianshu.com/p/ec88a61a0fa8
https://stackoverflow.com/questions/47806090/how-to-enable-pcntl-extensions-in-mamp-pro/50266295
边栏推荐
- 攻防世界 misc 进阶区 2017_Dating_in_Singapore
- Google Earth Engine(GEE)——基于 MCD64A1 的 GlobFire 日常火灾数据集
- Analog rocker controlled steering gear
- Google Earth engine (GEE) -- take modis/006/mcd19a2 as an example to batch download the daily mean, maximum, minimum, standard deviation, statistical analysis of variance and CSV download of daily AOD
- Feature scaling normalization
- Logo special training camp Section IV importance of font design
- 【lua】int64的支持
- Lost in the lock world of MySQL
- Redis入门完整教程:客户端通信协议
- On-off and on-off of quality system construction
猜你喜欢
Attack and defense world misc advanced area ditf
Unity修仙手游 | lua动态滑动功能(3种源码具体实现)
Attack and defense world misc advanced grace-50
Redis入门完整教程:慢查询分析
攻防世界 MISC 高手进阶区 001 normal_png
Erik baleog and Olaf, advanced area of misc in the attack and defense world
攻防世界 MISC 进阶 glance-50
Redis入门完整教程:客户端通信协议
SPSS installation and activation tutorial (including network disk link)
蓝队攻防演练中的三段作战
随机推荐
PMO: compare the sample efficiency of 25 molecular optimization methods
【室友用一局王者荣耀的时间学会了用BI报表数据处理】
Sword finger offer 68 - ii The nearest common ancestor of binary tree
Sword finger offer 67 Convert a string to an integer
Set up a website with a sense of ceremony, and post it to 1/2 of the public network through the intranet
业务太忙,真的是没时间搞自动化理由吗?
Redis入门完整教程:Pipeline
模拟摇杆控制舵机
Sword finger offer 68 - I. nearest common ancestor of binary search tree
10 schemes to ensure interface data security
Redis入门完整教程:初识Redis
堆排序代码详解
9 - class
Attack and defense world misc advanced zone 2017_ Dating_ in_ Singapore
NFT insider 64: e-commerce giant eBay submitted an NFT related trademark application, and KPMG will invest $30million in Web3 and metauniverse
攻防世界 MISC 进阶区 Erik-Baleog-and-Olaf
Sword finger offer 65 Add without adding, subtracting, multiplying, dividing
攻防世界 MISC 高手进阶区 001 normal_png
Unity vscode emmylua configuration error resolution
攻防世界 misc 进阶区 2017_Dating_in_Singapore