pcntl和posix 等安装同理
安装wget 已有该指令可以跳过
brew install wget
下载php(因为集成包里边才有pcntl)
wget http://us.php.net/distributions/php-7.2.10.tar.gz
解压
tar zxvf php-7.2.16.tar.gz
编译 pcntl.so 文件
cd ext/pcntl
phpize
./configure
make
pcntl.so文件在modules/pcntl.so下
将编译出来的扩展文件pcntl.so 移动到php的扩展目录 (/Applications/MAMP/bin/php/php-7.2.10/lib/php/extensions/no-debug-non-zts-20170718/根据自己的情况变化)
cp modules/pcntl.so /Applications/MAMP/bin/php/php-7.2.10/lib/php/extensions/no-debug-non-zts-20170718/
向php.ini 文件中添加该扩展
extension=pcntl.so 加入到配置文件
重启
Comments | NOTHING