mac 10.15.1 自带php7.3.9 装扩展pcntl

php官网下载 php-7.3.9.tar
1进入目录 php-7.3.9/ext/pcntl
2输入 phpize
#报错
#grep: /usr/include/php/main/php.h: No such file or directory
#grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
#grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
#Configuring for:
#PHP Api Version:        
#Zend Module Api No:     
#Zend Extension Api No:  
#Cannot find autoconf. Please check your autoconf installation and the
#$PHP_AUTOCONF environment variable. Then, rerun this script.

缺少头文件需要装 Command_Line_Tools_for_Xcode_11.3_beta_1  下面是链接
https://developer.apple.com/download/more/
安装完了不算好
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include /usr/include
报错
ln: /usr/include: Read-only file system
然后
sudo  /sbin/mount -uw /
再次执行上面命令成功。回到php安装文件上
再次输入phpize
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
安装brew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 
brew install autoconf
3
./configure
make
sudo   make install
4
php -i |grep php.ini
sudo chmod 777 /etc/php.ini
sudo vim /etc/php.ini
extension=pcntl
php -m

ok。。查了一下午时间终于完成了。记录下。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值