用cygwin安装php pcntl扩展
Jump to turn (13)
- 1用cygwin安装php pcntl扩展
- 2-bash: phpize: command not found
- 3-bash: apt-cyg: command not found
- 4$ phpize Configuring for: PHP Api Version: 20180731 Zend Module Api No: 20180731
- 5$ phpize Configuring for: PHP Api Version: 20180731 Zend Module Api No: 20180731
- 6$ apt-cyg install autoconf213 Installing autoconf213 Unable to locate package au
- 7autom4te-2.71: error: need GNU m4 1.4 or later: /usr/bin/m4
- 8configure.ac:7: warning: The macro LTACPROGSED' is obsolete. configure.ac:7: You
- 9make时报错/usr/local/php-7.3.4/ext/pcntl/pcntl.c: In function ‘pcntlsiginfotozval’:
- 10未找到siginfo.h
- 11Installing cygwin32-gcc-g++ Unable to locate package cygwin32-gcc-g++
- 12apt-cyg update后还是报错Installing cygwin32-gcc-g++ Unable to locate package cygwin32
- 13/usr/local/php-7.3.4/ext/pcntl/pcntl.c:1269:98: error: ‘siginfot’ has no member
- User
用cygwin安装php pcntl扩展
- Assistant
以下是用cygwin安装php pcntl扩展的步骤:
- 打开cygwin终端,输入以下命令安装php-devel和gcc:
codeapt-cyg install php-devel apt-cyg install gcc-
下载php的源代码,进入php源代码目录下找到ext/pcntl子目录。如果找不到该子目录,则需要在configure命令中加入--enable-pcntl选项重新编译安装php。
-
进入ext/pcntl目录,输入以下命令编译pcntl扩展:
codephpize ./configure make- 将编译好的pcntl.so文件复制到php扩展目录下,即php.ini文件中指定的extension_dir目录下。使用以下命令可以查看扩展目录:
codephp -i | grep extension_dir- 在php.ini文件中添加pcntl扩展信息:
codeextension=pcntl.so- 重启apache或php-fpm服务。
code/etc/init.d/httpd restart /etc/init.d/php-fpm restart- 通过php -m命令查看扩展是否已安装成功。