编译 php-memcache 扩展时提示Cannot find autoconf

下载memcache扩展 http://pecl.php.net/package/memcache ,到 /usr/local/src目录下并解压

[root@bogon src]# tar zxf memcache-2.2.7.tgz
[root@bogon src]# cd memcache-2.2.7
[root@bogon memcache-2.2.7]# ls
config9.m4  CREDITS      memcache_consistent_hash.c  memcache_queue.c    memcache_standard_hash.c
config.m4   example.php  memcache.dsp                memcache_queue.h    php_memcache.h
config.w32  memcache.c   memcache.php                memcache_session.c  README

根据当前的 php 版本动态的创建扩展的 configure 文件

[root@bogon memcache-2.2.7]# /usr/local/php7/bin/phpize 
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

错误提示  Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

缺少autoconf,通过yum安装 m4 和 autoconf

[root@bogon memcache-2.2.7]# yum install -y m4

[root@bogon memcache-2.2.7]# yum install -y autoconf

再次创建configure文件

[root@bogon memcache-2.2.7]# /usr/local/php7/bin/phpize 
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
[root@bogon memcache-2.2.7]# ls
acinclude.m4    config.sub    Makefile.global             memcache_standard_hash.c
aclocal.m4      configure     memcache.c                  missing
autom4te.cache  configure.ac  memcache_consistent_hash.c  mkinstalldirs
build           config.w32    memcache.dsp                php_memcache.h
config9.m4      CREDITS       memcache.php                README
config.guess    example.php   memcache_queue.c            run-tests.php
config.h.in     install-sh    memcache_queue.h
config.m4       ltmain.sh     memcache_session.c

转载于:https://www.cnblogs.com/splendid/p/10202176.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值