找到自己的php对应版本的源码并且进入openssl扩展
root@VM-0-10-ubuntu:/home/php/ext/openssl#
执行phpize命令(php的安装目录中的phpize)
如果报错某个文件不存在直接改名或者复制一份就行
root@VM-0-10-ubuntu:/home/php/ext/openssl# cp config0.m4 config.m4
执行phpize命令
root@VM-0-10-ubuntu:/home/php/ext/openssl# /usr/local/php8/bin/phpize
Configuring for:
PHP Api Version: 20200930
Zend Module Api No: 20200930
Zend Extension Api No: 420200930
构建编译环境
此时会发现有了一个configure文件
root@VM-0-10-ubuntu:/home/php/ext/openssl# ll
total 952
drwxrwxr-x 5 root root 4096 Mar 16 21:25 ./
drwxrwxr-x 73 root root 4096 Feb 16 05:34 ../
drwxr-xr-x 2 root root 4096 Mar 16 21:25 autom4te.cache/
drwxr-xr-x 2 root root 4096 Mar 16 21:25 build/
-rw-rw-r-- 1 root root 1245 Feb 16 05:34 config0.m4
-rw-r--r-- 1 root root 1712