当前位置:网站首页>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
边栏推荐
- Common methods in string class
- Persistence mechanism of redis
- 集群的概述与定义,一看就会
- Redis入门完整教程:事务与Lua
- 攻防世界 MISC 进阶 glance-50
- Practice and principle of PostgreSQL join
- Solana chain application crema was shut down due to hacker attacks
- Business is too busy. Is there really no reason to have time for automation?
- 测试必会:BUG的分类及推进解决
- Mongodb aggregation operation summary
猜你喜欢
A complete tutorial for getting started with redis: hyperloglog
NFT Insider #64:电商巨头eBay提交NFT相关商标申请,毕马威将在Web3和元宇宙中投入3000万美元
Unity-VScode-Emmylua配置报错解决
Business is too busy. Is there really no reason to have time for automation?
Advanced area of attack and defense world misc 3-11
Li Kou 98: verify binary search tree
Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
Persistence mechanism of redis
[roommate learned to use Bi report data processing in the time of King glory in one game]
[machine learning] handwritten digit recognition
随机推荐
Google Earth engine (GEE) - tasks upgrade enables run all to download all images in task types with one click
[Lua] Int64 support
剑指 Offer 67. 把字符串转换成整数
Logo special training camp Section V font structure and common design techniques
Attack and defense world misc master advanced zone 001 normal_ png
Sword finger offer 67 Convert a string to an integer
Redis入门完整教程:事务与Lua
剑指 Offer 68 - I. 二叉搜索树的最近公共祖先
[roommate learned to use Bi report data processing in the time of King glory in one game]
String类中的常用方法
Microservices -- Opening
Unity Xiuxian mobile game | Lua dynamic sliding function (specific implementation of three source codes)
NFT Insider #64:电商巨头eBay提交NFT相关商标申请,毕马威将在Web3和元宇宙中投入3000万美元
Google collab trample pit
Redis démarrer le tutoriel complet: Pipeline
The sandbox has reached a cooperation with digital Hollywood to accelerate the economic development of creators through human resource development
堆排序代码详解
The Sandbox 和数字好莱坞达成合作,通过人力资源开发加速创作者经济的发展
Now MySQL cdc2.1 is parsing the datetime class with a value of 0000-00-00 00:00:00
【OpenGL】笔记二十九、抗锯齿(MSAA)