今天安装tidy扩展,我用的是宝塔面板,php 7.3 7.4 8.0都有安装
我想在7.3版本上安装tidy扩展
进入php源码包目录
cd /www/server/php/73/src/ext/tidy
配置生成Makefile文件
/www/server/php/73/bin/phpize ./configure --with-php-config=/www/server/php/73/bin/php-config
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
然后 /www/server/php/73/src/ext/tidy 也生成了很多文件
make安装
make && make install
然后就gg了, 提示
make: *** 没有指明目标并且找不到 makefile。
发现 /www/server/php/73/src/ext/tidy 目录下也确实没有 makefile 文件, 只有一个 Makefile.global 文件
左试右试就是不生成makefile文件,百度google都没用
最后试了一下把生成配置的前面的phpize路径删了,既然成功了。 这尼玛, 坑死人。
/www/server/php/73/bin/phpize ./configure --with-php-config=/www/server/php/73/bin/php-config
改成了
./configure --with-php-config=/www/server/php/73/bin/php-config
终于生成了makefile文件
继续安装
make && make install
果断成功