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。。查了一下午时间终于完成了。记录下。
mac 10.15.1 自带php7.3.9 装扩展pcntl
最新推荐文章于 2021-10-20 13:40:33 发布