PHP 安装GD库扩展 报错 phpize Cannot find config.m4.

Sometimes, using the pecl installer is not an option. This could be because you're behind a firewall, or it could be because the extension you want to install is not available as a PECL compatible package, such as unreleased extensions from SVN. If you need to build such an extension, you can use the lower-level build tools to perform the build manually.

The phpize command is used to prepare the build environment for a PHP extension. In the following sample, the sources for an extension are in a directory named extname:

$ cd extname
$ phpize
$ ./configure
$ make
# make install

摘自:http://php.net/manual/en/install.pecl.phpize.php

例:在扩展GD库的时候执行phpize报错

phpize 
Cannot find config.m4. 
Make sure that you run '/data/php/bin/phpize' in the top level source directory of the module

cd /usr/src/php-5.6.2/ext/gd
phpize
./configure
make
make install
vim /data/php/etc/php.ini
添加
extension_dir = "/data/php/lib/php/extensions/no-debug-non-zts-20131226/"
extension=gd.so
重启php
/etc/init.d/php-fpm restart
php -m | grep gd
gd


转载于:https://my.oschina.net/liuhuan0927/blog/655035

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值